Include file:
#include "mcrl2/atermpp/aterm_balanced_tree.h
atermpp::
term_balanced_tree
¶Read-only balanced binary tree of terms.
atermpp::term_balanced_tree::
difference_type
¶typedef for ptrdiff_t
A signed integral type.
atermpp::term_balanced_tree::
pointer
¶typedef for Term *
Pointer to T.
atermpp::term_balanced_tree::
reference
¶typedef for Term &
Reference to T.
atermpp::term_balanced_tree::
size_type
¶typedef for std::size_t
An unsigned integral type.
atermpp::term_balanced_tree::
value_type
¶typedef for Term
The type of object, T stored in the term_balanced_tree.
const typedef Term atermpp::term_balanced_tree::const_reference
Const reference to T.
friend void atermpp::term_balanced_tree::make_term_balanced_tree
empty_tree
()¶make_tree
(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)¶make_tree_helper
(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)¶tree_empty_function
()¶tree_node_function
()¶tree_single_node_function
()¶begin
() constReturns an iterator pointing to the beginning of the term_balanced_tree.
Returns: The beginning of the list.
element_at
(std::size_t position, std::size_t size) const¶Get an element at the indicated position.
Parameters:
By providing the size this operation is logarithmic. If a wrong size is provided the outcome is not determined. See also operator [].
Returns: The element at the indicated position.
empty
() constReturns true if tree is empty.
Returns: True iff the tree is empty.
end
() constReturns an iterator pointing to the end of the term_balanced_tree.
Returns: The end of the list.
is_node
() const¶Returns true iff the tree is a node with a left and right subtree.
Returns: True iff the tree is a node with a left and right subtree.
left_branch
() const¶Get the left branch of the tree.
It is assumed that the tree is a node with a left branch.
Returns: A reference t the left subtree of the current tree
operator=
(const term_balanced_tree&) noexcept = default¶Assignment operator.
operator=
(term_balanced_tree&&) noexcept = default¶Move assign operator.
operator[]
(std::size_t position) const¶Element indexing operator.
Parameters:
This operation behaves linearly with respect to container size, because it must calculate the size of the container. The operator element_at behaves logarithmically.
right_branch
() const¶Get the left branch of the tree.
It is assumed that the tree is a node with a left branch.
Returns: A reference t the left subtree of the current tree
size
() constReturns the size of the term_balanced_tree.
This operator is linear in the size of the balanced tree.
Returns: The size of the tree.
term_balanced_tree
()¶Default constructor. Creates an empty tree.
term_balanced_tree
(const term_balanced_tree&) noexcept = default¶Copy constructor.
term_balanced_tree
(ForwardTraversalIterator first, const std::size_t size)¶Creates an term_balanced_tree with a copy of a range.
Parameters:
term_balanced_tree
(ForwardTraversalIterator first, const std::size_t size, Transformer transformer)¶Creates an term_balanced_tree with a copy of a range, where a transformer is applied to each term before adding it to the tree..
Parameters:
term_balanced_tree
(term_balanced_tree&&) noexcept = default¶Move constructor.