__gnu_pbds::tree.3cxx
Contents
Constructor & Destructor Documentation
template<typenameKey,typenameMapped,typenameCmp_Fn=std::less<Key>,typenameTag=rb_tree_tag,template<typenameNode_CItr,typenameNode_Itr,typenameCmp_Fn_,typename_Alloc_>classNode_Update=null_node_update,typename_Alloc=std::allocator<char>>__gnu_pbds::tree<Key,Mapped,Cmp_Fn,Tag,Node_Update,_Alloc>::tree(constcmp_fn&c)[inline]
Constructor taking some policy objects. r_cmp_fn will be copied by the Cmp_Fn object of the container
object.
template<typenameKey,typenameMapped,typenameCmp_Fn=std::less<Key>,typenameTag=rb_tree_tag,template<typenameNode_CItr,typenameNode_Itr,typenameCmp_Fn_,typename_Alloc_>classNode_Update=null_node_update,typename_Alloc=std::allocator<char>>template<typenameIt>__gnu_pbds::tree<Key,Mapped,Cmp_Fn,Tag,Node_Update,_Alloc>::tree(Itfirst,Itlast)[inline]
Constructor taking __iterators to a range of value_types. The value_types between first_it and last_it
will be inserted into the container object.
template<typenameKey,typenameMapped,typenameCmp_Fn=std::less<Key>,typenameTag=rb_tree_tag,template<typenameNode_CItr,typenameNode_Itr,typenameCmp_Fn_,typename_Alloc_>classNode_Update=null_node_update,typename_Alloc=std::allocator<char>>template<typenameIt>__gnu_pbds::tree<Key,Mapped,Cmp_Fn,Tag,Node_Update,_Alloc>::tree(Itfirst,Itlast,constcmp_fn&c)[inline]
Constructor taking __iterators to a range of value_types and some policy objects The value_types between
first_it and last_it will be inserted into the container object. r_cmp_fn will be copied by the cmp_fn
object of the container object.
Detailed Description
template<typenameKey,typenameMapped,typenameCmp_Fn=std::less<Key>,typenameTag=rb_tree_tag,template<typenameNode_CItr,typenameNode_Itr,typenameCmp_Fn_,typename_Alloc_>classNode_Update=null_node_update,typename_Alloc=std::allocator<char>>
class __gnu_pbds::tree< Key, Mapped, Cmp_Fn, Tag, Node_Update, _Alloc >"A tree-based container.
TemplateParametersKey Key type.
Mapped Map type.
Cmp_Fn Comparison functor.
Tag Instantiating data structure type, see container_tag.
Node_Update Updates tree internal-nodes, restores invariants when invalidated. XXX See design::tree-
based-containersnode invariants.
_Alloc Allocator type.
Base tag choices are: ov_tree_tag, rb_tree_tag, splay_tree_tag.
Base is basic_branch.
Member Typedef Documentation
template<typenameKey,typenameMapped,typenameCmp_Fn=std::less<Key>,typenameTag=rb_tree_tag,template<typenameNode_CItr,typenameNode_Itr,typenameCmp_Fn_,typename_Alloc_>classNode_Update=null_node_update,typename_Alloc=std::allocator<char>>typedefCmp_Fn__gnu_pbds::tree<Key,Mapped,Cmp_Fn,Tag,Node_Update,_Alloc>::cmp_fn
Comparison functor type.
Name
__gnu_pbds::tree< Key, Mapped, Cmp_Fn, Tag, Node_Update, _Alloc >
Synopsis
#include <assoc_container.hpp>
Inherits __gnu_pbds::basic_branch<Key,Mapped,Tag,Node_Update,Policy_Tl,_Alloc>.
PublicTypes
typedef Cmp_Fn cmp_fn
Comparison functor type.
typedef Node_Update node_updatePublicMemberFunctionstree (const cmp_fn &c)
Constructor taking some policy objects. r_cmp_fn will be copied by the Cmp_Fn object of the container
object.
tree (const tree &other)
template<typename It > tree (It first, It last)
Constructor taking __iterators to a range of value_types. The value_types between first_it and
last_it will be inserted into the container object.
template<typename It > tree (It first, It last, const cmp_fn &c)
Constructor taking __iterators to a range of value_types and some policy objects The value_types
between first_it and last_it will be inserted into the container object. r_cmp_fn will be copied by
the cmp_fn object of the container object.
tree & operator= (const tree &other)
void swap (tree &other)
