Include file:
#include "mcrl2/atermpp/aterm_balanced_tree.h
atermpp::
term_balanced_tree
¶Read-only balanced binary tree of terms.
const_reference
¶typedef for const Term
Const reference to T.
difference_type
¶typedef for ptrdiff_t
A signed integral type.
pointer
¶typedef for Term *
Pointer to T.
reference
¶typedef for Term &
Reference to T.
size_type
¶typedef for std::size_t
An unsigned integral type.
value_type
¶typedef for Term
The type of object, T stored in the term_balanced_tree.
empty_tree
()¶
make_node
(const term_balanced_tree &left_tree, const term_balanced_tree &right_tree)¶
tree_empty_function
()¶
tree_node_function
()¶
make_tree
(ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)¶
term_balanced_tree
(detail::_term_appl *t)¶
begin
() const¶Returns 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
() const¶Returns true if tree is empty.
Returns: True iff the tree is empty.
end
() const¶Returns 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
() const¶Returns 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
(term_balanced_tree&&) noexcept = default¶Move 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: