@extends('layouts.TreeContainerLibrary') @section('styles') @stop @section('panel-heading') Associative Trees @stop @section('content')
The associative trees consist of tree, multitree, and unique_tree. These trees are categorized as associative trees, because they all use associative containers (std::set) as their internal node containers. The forth tree container, sequential_tree, is a sequential type of tree, because it uses a std::vector as it's internal node container.
The associative trees have many operations and properties in common. These operations are grouped below according to the type of operation. The documentation below applies to TCL versions 3.50 and higher. The latest version of the TCL can be downloaded from the TCL download page.
bool erase(stored_type& element)
iterator find(const stored_type& element)
end node
if unsuccessful. There is a slight variances in the behavior of the multitree container.
Since multitree can have multiple occurences in a single parent, the iterator will return a pointer to the first found occurrence, or the end
iterator if not found. Remember that when searching nodes, the node_compare_type
will determine the equality of the node that's
being sought.const_iterator find(const stored_type& element) const
const_iterator
rather than iterator
.size_type count(const stored_type& element)
iterator lower_bound(const stored_type& element)
const_iterator lower_bound(const_stored_type& element)
constiterator upper_bound(const stored_type& element)
const_iterator upper_bound(const stored_type& element)
conststd::pair<iterator, iterator> equal_range(const stored_type& element)
std::pair<const_iterator, const_iterator> equal_range(const stored_type& element)
const