Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template floating_point

boost::intrusive::floating_point

Synopsis

// In header: <boost/intrusive/options.hpp>

template<bool Enabled> 
struct floating_point {
};

Description

This option setter for scapegoat containers specifies if the intrusive scapegoat container uses floating-point operations to support a variable alpha value.

If deactivated (floating_point<false>), the container uses a fixed alpha value of 1/sqrt(2) and does not need floating-point operations. This also saves some space in the container since the alpha value and some additional data are not stored in the container.

If the user only needs an alpha value near 1/sqrt(2), deactivating this option also improves performance since it avoids logarithm and division operations when rebalancing the tree.


PrevUpHomeNext