GiNaCRA
0.6.4
|
Iterator which traverses only the nodes which are siblings of each other. More...
#include <tree.h>
Public Types | |
typedef T | value_type |
typedef T * | pointer |
typedef T & | reference |
typedef size_t | size_type |
typedef ptrdiff_t | difference_type |
typedef std::bidirectional_iterator_tag | iterator_category |
Public Member Functions | |
sibling_iterator () | |
sibling_iterator (tree_node *) | |
sibling_iterator (const sibling_iterator &) | |
sibling_iterator (const iterator_base &) | |
bool | operator== (const sibling_iterator &) const |
bool | operator!= (const sibling_iterator &) const |
sibling_iterator & | operator++ () |
sibling_iterator & | operator-- () |
sibling_iterator | operator++ (int) |
sibling_iterator | operator-- (int) |
sibling_iterator & | operator+= (unsigned int) |
sibling_iterator & | operator-= (unsigned int) |
tree_node * | range_first () const |
tree_node * | range_last () const |
T & | operator* () const |
T * | operator-> () const |
void | skip_children () |
When called, the next increment/decrement skips children of this node. | |
void | skip_children (bool skip) |
unsigned int | number_of_children () const |
Number of children of the node pointed to by the iterator. | |
sibling_iterator | begin () const |
sibling_iterator | end () const |
Data Fields | |
tree_node * | parent_ |
tree_node * | node |
Protected Attributes | |
bool | skip_current_children_ |
Private Member Functions | |
void | set_parent_ () |
Iterator which traverses only the nodes which are siblings of each other.
typedef ptrdiff_t GiNaCRA::tree< T, tree_node_allocator >::iterator_base::difference_type [inherited] |
typedef std::bidirectional_iterator_tag GiNaCRA::tree< T, tree_node_allocator >::iterator_base::iterator_category [inherited] |
typedef T* GiNaCRA::tree< T, tree_node_allocator >::iterator_base::pointer [inherited] |
typedef T& GiNaCRA::tree< T, tree_node_allocator >::iterator_base::reference [inherited] |
typedef size_t GiNaCRA::tree< T, tree_node_allocator >::iterator_base::size_type [inherited] |
typedef T GiNaCRA::tree< T, tree_node_allocator >::iterator_base::value_type [inherited] |
GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator | ( | ) |
GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator | ( | tree_node * | tn | ) |
GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator | ( | const sibling_iterator & | other | ) |
GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator | ( | const iterator_base & | other | ) |
tree< T, tree_node_allocator >::sibling_iterator GiNaCRA::tree< T, tree_node_allocator >::iterator_base::begin | ( | ) | const [inherited] |
Definition at line 2462 of file tree.h.
References GiNaCRA::tree< T, tree_node_allocator >::end(), and GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::parent_.
Referenced by GiNaCRA::tree< T, tree_node_allocator >::merge().
tree< T, tree_node_allocator >::sibling_iterator GiNaCRA::tree< T, tree_node_allocator >::iterator_base::end | ( | ) | const [inherited] |
Definition at line 2474 of file tree.h.
References GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::parent_.
Referenced by GiNaCRA::tree< T, tree_node_allocator >::merge().
unsigned int GiNaCRA::tree< T, tree_node_allocator >::iterator_base::number_of_children | ( | ) | const [inherited] |
Number of children of the node pointed to by the iterator.
Definition at line 2497 of file tree.h.
References GiNaCRA::tree_node_< T >::first_child, GiNaCRA::tree_node_< T >::last_child, and GiNaCRA::tree_node_< T >::next_sibling.
Referenced by GiNaCRA::tree< T, tree_node_allocator >::equal().
bool GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator!= | ( | const sibling_iterator & | other | ) | const |
Definition at line 2429 of file tree.h.
References GiNaCRA::tree< T, tree_node_allocator >::iterator_base::node.
T & GiNaCRA::tree< T, tree_node_allocator >::iterator_base::operator* | ( | ) | const [inherited] |
tree< T, tree_node_allocator >::sibling_iterator & GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator++ | ( | ) |
Definition at line 3142 of file tree.h.
References GiNaCRA::tree< T, tree_node_allocator >::next_sibling().
tree< T, tree_node_allocator >::sibling_iterator GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator++ | ( | int | ) |
tree< T, tree_node_allocator >::sibling_iterator & GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator+= | ( | unsigned int | num | ) |
tree< T, tree_node_allocator >::sibling_iterator & GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator-- | ( | ) |
tree< T, tree_node_allocator >::sibling_iterator GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator-- | ( | int | ) |
tree< T, tree_node_allocator >::sibling_iterator & GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator-= | ( | unsigned int | num | ) |
T * GiNaCRA::tree< T, tree_node_allocator >::iterator_base::operator-> | ( | ) | const [inherited] |
bool GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator== | ( | const sibling_iterator & | other | ) | const |
Definition at line 2437 of file tree.h.
References GiNaCRA::tree< T, tree_node_allocator >::iterator_base::node.
tree< T, tree_node_allocator >::tree_node * GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::range_first | ( | ) | const |
Definition at line 3206 of file tree.h.
References GiNaCRA::tree_node_< T >::first_child.
tree< T, tree_node_allocator >::tree_node * GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::range_last | ( | ) | const |
Definition at line 3214 of file tree.h.
Referenced by GiNaCRA::tree< T, tree_node_allocator >::insert(), GiNaCRA::tree< T, tree_node_allocator >::leaf_iterator::leaf_iterator(), GiNaCRA::tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator(), and GiNaCRA::tree< T, tree_node_allocator >::pre_order_iterator::pre_order_iterator().
void GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::set_parent_ | ( | ) | [private] |
Definition at line 3131 of file tree.h.
References GiNaCRA::tree< T, tree_node_allocator >::parent().
void GiNaCRA::tree< T, tree_node_allocator >::iterator_base::skip_children | ( | ) | [inherited] |
When called, the next increment/decrement skips children of this node.
Definition at line 2483 of file tree.h.
Referenced by GiNaCRA::tree< T, tree_node_allocator >::copy_().
void GiNaCRA::tree< T, tree_node_allocator >::iterator_base::skip_children | ( | bool | skip | ) | [inherited] |
tree_node* GiNaCRA::tree< T, tree_node_allocator >::iterator_base::node [inherited] |
Definition at line 131 of file tree.h.
Referenced by GiNaCRA::tree< T, tree_node_allocator >::begin_fixed(), GiNaCRA::tree< T, tree_node_allocator >::debug_verify_consistency(), GiNaCRA::tree< T, tree_node_allocator >::index(), GiNaCRA::tree< T, tree_node_allocator >::insert(), GiNaCRA::tree< T, tree_node_allocator >::move_before(), GiNaCRA::tree< T, tree_node_allocator >::pre_order_iterator::operator!=(), GiNaCRA::tree< T, tree_node_allocator >::post_order_iterator::operator!=(), GiNaCRA::tree< T, tree_node_allocator >::breadth_first_queued_iterator::operator!=(), GiNaCRA::tree< T, tree_node_allocator >::fixed_depth_iterator::operator!=(), GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator!=(), GiNaCRA::tree< T, tree_node_allocator >::leaf_iterator::operator!=(), GiNaCRA::tree< T, tree_node_allocator >::iterator_base_less::operator()(), GiNaCRA::tree< T, tree_node_allocator >::breadth_first_queued_iterator::operator++(), GiNaCRA::tree< T, tree_node_allocator >::pre_order_iterator::operator==(), GiNaCRA::tree< T, tree_node_allocator >::post_order_iterator::operator==(), GiNaCRA::tree< T, tree_node_allocator >::breadth_first_queued_iterator::operator==(), GiNaCRA::tree< T, tree_node_allocator >::fixed_depth_iterator::operator==(), GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::operator==(), GiNaCRA::tree< T, tree_node_allocator >::leaf_iterator::operator==(), GiNaCRA::tree< T, tree_node_allocator >::reparent(), GiNaCRA::tree< T, tree_node_allocator >::replace(), GiNaCRA::tree< T, tree_node_allocator >::sort(), and GiNaCRA::tree< T, tree_node_allocator >::swap().
tree_node* GiNaCRA::tree< T, tree_node_allocator >::sibling_iterator::parent_ |
Definition at line 246 of file tree.h.
Referenced by GiNaCRA::tree< T, tree_node_allocator >::iterator_base::begin(), GiNaCRA::tree< T, tree_node_allocator >::iterator_base::end(), GiNaCRA::tree< T, tree_node_allocator >::end(), GiNaCRA::tree< T, tree_node_allocator >::insert(), GiNaCRA::tree< T, tree_node_allocator >::leaf_iterator::leaf_iterator(), GiNaCRA::tree< T, tree_node_allocator >::move_before(), GiNaCRA::tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator(), and GiNaCRA::tree< T, tree_node_allocator >::pre_order_iterator::pre_order_iterator().
bool GiNaCRA::tree< T, tree_node_allocator >::iterator_base::skip_current_children_ [protected, inherited] |