The class template splaytree is an intrusive splay tree container that is used to construct intrusive splay_set and splay_multiset containers. More...
#include <splaytree.hpp>
Public Types | |
typedef ValueTraits | value_traits |
typedef implementation_defined::pointer | pointer |
typedef implementation_defined::const_pointer | const_pointer |
typedef implementation_defined::value_type | value_type |
typedef implementation_defined::key_type | key_type |
typedef implementation_defined::reference | reference |
typedef implementation_defined::const_reference | const_reference |
typedef implementation_defined::difference_type | difference_type |
typedef implementation_defined::size_type | size_type |
typedef implementation_defined::value_compare | value_compare |
typedef implementation_defined::key_compare | key_compare |
typedef implementation_defined::iterator | iterator |
typedef implementation_defined::const_iterator | const_iterator |
typedef implementation_defined::reverse_iterator | reverse_iterator |
typedef implementation_defined::const_reverse_iterator | const_reverse_iterator |
typedef implementation_defined::node_traits | node_traits |
typedef implementation_defined::node | node |
typedef implementation_defined::node_ptr | node_ptr |
typedef implementation_defined::const_node_ptr | const_node_ptr |
typedef implementation_defined::node_algorithms | node_algorithms |
typedef implementation_defined::insert_commit_data | insert_commit_data |
Public Member Functions | |
splaytree_impl (const value_compare &cmp=value_compare(), const value_traits &v_traits=value_traits()) | |
template<class Iterator > | |
splaytree_impl (bool unique, Iterator b, Iterator e, const value_compare &cmp=value_compare(), const value_traits &v_traits=value_traits()) | |
splaytree_impl (BOOST_RV_REF(splaytree_impl) x) | |
splaytree_impl & | operator= (BOOST_RV_REF(splaytree_impl) x) |
void | splay_up (iterator i) |
Requires: i must be a valid iterator of *this. More... | |
template<class KeyType , class KeyValueCompare > | |
iterator | splay_down (const KeyType &key, KeyValueCompare comp) |
Effects: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree. More... | |
iterator | splay_down (const_reference value) |
Effects: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree. More... | |
Static Public Attributes | |
static const bool | constant_time_size = implementation_defined::constant_time_size |
The class template splaytree is an intrusive splay tree container that is used to construct intrusive splay_set and splay_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<>
, constant_time_size<>
, size_type<>
and compare<>
.
typedef implementation_defined::const_iterator boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::const_iterator |
typedef implementation_defined::const_node_ptr boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::const_node_ptr |
typedef implementation_defined::const_pointer boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::const_pointer |
typedef implementation_defined::const_reference boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::const_reference |
typedef implementation_defined::const_reverse_iterator boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::const_reverse_iterator |
typedef implementation_defined::difference_type boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::difference_type |
typedef implementation_defined::insert_commit_data boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::insert_commit_data |
typedef implementation_defined::iterator boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::iterator |
typedef implementation_defined::key_compare boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::key_compare |
typedef implementation_defined::key_type boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::key_type |
typedef implementation_defined::node boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::node |
typedef implementation_defined::node_algorithms boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::node_algorithms |
typedef implementation_defined::node_ptr boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::node_ptr |
typedef implementation_defined::node_traits boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::node_traits |
typedef implementation_defined::pointer boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::pointer |
typedef implementation_defined::reference boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::reference |
typedef implementation_defined::reverse_iterator boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::reverse_iterator |
typedef implementation_defined::size_type boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::size_type |
typedef implementation_defined::value_compare boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::value_compare |
typedef ValueTraits boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::value_traits |
typedef implementation_defined::value_type boost::intrusive::splaytree_impl< ValueTraits, VoidOrKeyComp, SizeType, ConstantTimeSize, HeaderHolder >::value_type |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
Effects: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree.
If the element is not present returns the last node compared with the key. If the tree is empty, end() is returned.
Complexity: Amortized logarithmic.
Returns: An iterator to the new root of the tree, end() if the tree is empty.
Throws: If the comparison functor throws.
Referenced by boost::intrusive::splaytree_impl< ValueTraits, Compare, SizeType, ConstantTimeSize, HeaderHolder >::splay_down().
|
inline |
Effects: Rearranges the container so that if *this stores an element with a key equivalent to value the element is placed as the root of the tree.
Complexity: Amortized logarithmic.
Returns: An iterator to the new root of the tree, end() if the tree is empty.
Throws: If the predicate throws.
|
inline |
Requires: i must be a valid iterator of *this.
Effects: Rearranges the container so that the element pointed by i is placed as the root of the tree, improving future searches of this value.
Complexity: Amortized logarithmic.
Throws: Nothing.
|
static |