The class template sgtree is an intrusive scapegoat tree container, that is used to construct intrusive sg_set and sg_multiset containers.
More...
|
| typedef | BOOST_INTRUSIVE_IMPDEF (sgtree_algorithms< node_traits >) node_algorithms |
| |
| typedef | BOOST_INTRUSIVE_IMPDEF (typename node_algorithms::insert_commit_data) insert_commit_data |
| |
| | sgtree_impl (const value_compare &cmp=value_compare(), const value_traits &v_traits=value_traits()) |
| |
| template<class Iterator > |
| | sgtree_impl (bool unique, Iterator b, Iterator e, const value_compare &cmp=value_compare(), const value_traits &v_traits=value_traits()) |
| |
| | sgtree_impl (BOOST_RV_REF(sgtree_impl) x) |
| |
| sgtree_impl & | operator= (BOOST_RV_REF(sgtree_impl) x) |
| |
| void | swap (sgtree_impl &other) |
| |
| template<class Cloner , class Disposer > |
| void | clone_from (const sgtree_impl &src, Cloner cloner, Disposer disposer) |
| |
| iterator | insert_equal (reference value) |
| |
| iterator | insert_equal (const_iterator hint, reference value) |
| |
| template<class Iterator > |
| void | insert_equal (Iterator b, Iterator e) |
| |
| std::pair< iterator, bool > | insert_unique (reference value) |
| |
| iterator | insert_unique (const_iterator hint, reference value) |
| |
| template<class KeyType , class KeyValueCompare > |
| std::pair< iterator, bool > | insert_unique_check (const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) |
| |
| template<class KeyType , class KeyValueCompare > |
| std::pair< iterator, bool > | insert_unique_check (const_iterator hint, const KeyType &key, KeyValueCompare key_value_comp, insert_commit_data &commit_data) |
| |
| iterator | insert_unique_commit (reference value, const insert_commit_data &commit_data) |
| |
| template<class Iterator > |
| void | insert_unique (Iterator b, Iterator e) |
| |
| iterator | insert_before (const_iterator pos, reference value) |
| |
| void | push_back (reference value) |
| |
| void | push_front (reference value) |
| |
| iterator | erase (const_iterator i) |
| |
| iterator | erase (const_iterator b, const_iterator e) |
| |
| size_type | erase (const_reference value) |
| |
| template<class KeyType , class KeyValueCompare > |
| size_type | erase (const KeyType &key, KeyValueCompare comp) |
| |
| template<class Disposer > |
| iterator | erase_and_dispose (const_iterator i, Disposer disposer) |
| |
| template<class Disposer > |
| iterator | erase_and_dispose (iterator i, Disposer disposer) |
| |
| template<class Disposer > |
| iterator | erase_and_dispose (const_iterator b, const_iterator e, Disposer disposer) |
| |
| template<class Disposer > |
| size_type | erase_and_dispose (const_reference value, Disposer disposer) |
| |
| template<class KeyType , class KeyValueCompare , class Disposer > |
| size_type | erase_and_dispose (const KeyType &key, KeyValueCompare comp, Disposer disposer) |
| |
| void | clear () |
| |
| template<class Disposer > |
| void | clear_and_dispose (Disposer disposer) |
| |
| float | balance_factor () const |
| | Returns: The balance factor (alpha) used in this tree More...
|
| |
| void | balance_factor (float new_alpha) |
| | Requires: new_alpha must be a value between 0.5 and 1.0 More...
|
| |
template<class ValueTraits, class VoidOrKeyComp, class SizeType, bool FloatingPoint, typename HeaderHolder>
class boost::intrusive::sgtree_impl< ValueTraits, VoidOrKeyComp, SizeType, FloatingPoint, HeaderHolder >
The class template sgtree is an intrusive scapegoat tree container, that is used to construct intrusive sg_set and sg_multiset containers.
The no-throw guarantee holds only, if the value_compare object doesn't throw.
The template parameter T is the type to be managed by the container. The user can specify additional options and if no options are provided default options are used.
The container supports the following options: base_hook<>/member_hook<>/value_traits<>, floating_point<>, size_type<> and compare<>.
template<class ValueTraits, class VoidOrKeyComp, class SizeType, bool FloatingPoint, typename HeaderHolder>
Requires: new_alpha must be a value between 0.5 and 1.0
Effects: Establishes a new balance factor (alpha) and rebalances the tree if the new balance factor is stricter (less) than the old factor.
Throws: Nothing.
Complexity: Linear to the elements in the subtree.
template<class ValueTraits, class VoidOrKeyComp, class SizeType, bool FloatingPoint, typename HeaderHolder>
template<class Cloner , class Disposer >
| void boost::intrusive::sgtree_impl< ValueTraits, VoidOrKeyComp, SizeType, FloatingPoint, HeaderHolder >::clone_from |
( |
const sgtree_impl< ValueTraits, VoidOrKeyComp, SizeType, FloatingPoint, HeaderHolder > & |
src, |
|
|
Cloner |
cloner, |
|
|
Disposer |
disposer |
|
) |
| |
|
inline |
Additional notes: it also copies the alpha factor from the source container.
template<class ValueTraits, class VoidOrKeyComp, class SizeType, bool FloatingPoint, typename HeaderHolder>
template<class KeyType , class KeyValueCompare >
| std::pair<iterator, bool> boost::intrusive::sgtree_impl< ValueTraits, VoidOrKeyComp, SizeType, FloatingPoint, HeaderHolder >::insert_unique_check |
( |
const KeyType & |
key, |
|
|
KeyValueCompare |
key_value_comp, |
|
|
insert_commit_data & |
commit_data |
|
) |
| |
|
inline |