# Spec RightArrayBinaryTree Iterator
An iterator for RightArrayBinaryTree.

Extends | Iter
All Extended | Iter
All Impl'd | IteratorAssociatedTypesConcept
Defined in | <seqan/index.h>
Signature | `template <typename TSpec> class Iter<TRightArrayBinaryTree, TSpec >;`

## Template Parameters

`TSpec` | Specialisation Tag. Types: TopDownIterator
`TRightArrayBinaryTree` | The RightArrayBinaryTree.

## Member Function Overview

### Member Functions Inherited From Iter

- `Iter`

## Interface Function Overview

- `TContainer container(iterator)`
  Container of an iterator.
- `TChar getCharacter(iterator);`
  This function returns the pivot character of the node the iterator currently points to.
- `unsigned getLeftChildPos(iterator);`
  Returns the position in RightArrayBinaryTree of the left child node.
- `unsigned getPosition(iterator);`
  Returns the position of the iterator in the host.
- `unsigned getLeftChildPos(iterator);`
  Returns the position in RightArrayBinaryTree of the right child node.
- `unsigned getSubTreeSize(iterator);`
  Returns the number of vertices in the subtree starting at the position an iterator points to.
- `bool goDown(iterator);`
  Iterates down the leftmost edge in a RightArrayBinaryTree.
- `bool goLeftChild(iterator);`
  Sets the iterator to the left child of the current node if it exists and returns true, otherwise the iterator does not change position and the function returns false.
- `bool goRight(iterator);`
  Iterates to the next sibling in a RightArrayBinaryTree.
- `bool goRightChild(iterator);`
  Sets the iterator to the right child of the current node if it exists and returns true, otherwise the iterator does not change position and the function returns false.
- `bool goUp(iterator);`
  Iterates up one edge to the parent in a RightArrayBinaryTree.
- `bool isLeaf(iterator);`
  Tests whether a given node is a leaf or not.
- `bool isRoot(iterator);`
  Test whether a iterator points to the root node.
- `void setCharacter(iterator, character);`
  The function sets the character of the node the iterator points to to character.

### Interface Functions Inherited From IteratorAssociatedTypesConcept

- `operator*`
- `value`
- `getValue`

## Interface Metafunction Overview

### Interface Metafunctions Inherited From Iter

- `Container`
- `IterComplementConst`
- `IterMakeConst`
- `Spec`

### Interface Metafunctions Inherited From IteratorAssociatedTypesConcept

- `Difference`
- `GetValue`
- `Pointer`
- `Reference`
- `Value`

## Interface Functions Detail

### `TContainer container(iterator)`

Container of an iterator.

#### Parameters

`iterator` | An iterator.

#### Returns

`TContainer` | The container that `iterator` traverses.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `TChar getCharacter(iterator);`

This function returns the pivot character of the node the iterator currently points to.

#### Parameters

`iterator` | The iterator.

#### Returns

`TChar` | The resulting character.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `unsigned getLeftChildPos(iterator);`

Returns the position in RightArrayBinaryTree of the left child node.

#### Parameters

`iterator` | The iterator.

#### Returns

`unsigned` | The left child position.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `unsigned getPosition(iterator);`

Returns the position of the iterator in the host.

#### Parameters

`iterator` | The iterator.

#### Returns

`unsigned` | The position.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `unsigned getLeftChildPos(iterator);`

Returns the position in RightArrayBinaryTree of the right child node.

#### Parameters

`iterator` | The iterator.

#### Returns

`unsigned` | The left child position.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `unsigned getSubTreeSize(iterator);`

Returns the number of vertices in the subtree starting at the position an iterator points to.

#### Parameters

`iterator` | The iterator.

#### Returns

`unsigned` | The subtree size.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool goDown(iterator);`

Iterates down the leftmost edge in a RightArrayBinaryTree.

#### Parameters

`iterator` | The iterator

#### Returns

`bool` | `true` if an edge to go down exists, otherwise `false`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool goLeftChild(iterator);`

Sets the iterator to the left child of the current node if it exists and returns true, otherwise the iterator does not change position and the function returns false.

#### Parameters

`iterator` | The iterator

#### Returns

`bool` | `true` if the edge to go down exists, otherwise `false`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool goRight(iterator);`

Iterates to the next sibling in a RightArrayBinaryTree.

#### Parameters

`iterator` | The iterator

#### Returns

`bool` | `true` if the iterator could be moved, otherwise `false`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool goRightChild(iterator);`

Sets the iterator to the right child of the current node if it exists and returns true, otherwise the iterator does not change position and the function returns false.

#### Parameters

`iterator` | The iterator.

#### Returns

`bool` | `true` if the edge to go down exists, otherwise `false`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool goUp(iterator);`

Iterates up one edge to the parent in a RightArrayBinaryTree.

#### Parameters

`iterator` | The iterator.

#### Returns

`bool` | `true` if the iterator could be moved, otherwise `false`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool isLeaf(iterator);`

Tests whether a given node is a leaf or not.

#### Parameters

`iterator` | The iterator.

#### Returns

`bool` | `true` if the node is a leaf.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `bool isRoot(iterator);`

Test whether a iterator points to the root node.

#### Parameters

`iterator` | The iterator.

#### Returns

`bool` | `true` if `iterator` points to the root of the tree, otherwise `false`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

### `void setCharacter(iterator, character);`

The function sets the character of the node the iterator points to to character.

#### Parameters

`iterator` | The iterator.
`character` | The character to be assigned to a node.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

#### Dox Sources

    /*!
     * @class RightArrayBinaryTreeIterator RightArrayBinaryTree Iterator
     *
     * @extends Iter
     *
     * @headerfile <seqan/index.h>
     *
     * @brief An iterator for @link RightArrayBinaryTree @endlink.
     *
     * @signature template <typename TSpec> class Iter<TRightArrayBinaryTree, TSpec
     *            >;
     *
     * @tparam TSpec Specialisation Tag. Types: TopDownIterator
     * @tparam TRightArrayBinaryTree The @link RightArrayBinaryTree @endlink.
     *
     * @fn RightArrayBinaryTreeIterator#container
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Container of an iterator.
     *
     * @signature TContainer container(iterator)
     *
     * @param[in] iterator An iterator.
     *
     * @return TContainer The container that <tt>iterator</tt> traverses.
     *
     * @fn RightArrayBinaryTreeIterator#getCharacter
     *
     * @headerfile <seqan/index.h>
     *
     * @brief This function returns the pivot character of the node the iterator
     *        currently points to.
     *
     * @signature TChar getCharacter(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return TChar The resulting character.
     *
     * @fn RightArrayBinaryTreeIterator#getLeftChildPos
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns the position in @link RightArrayBinaryTree @endlink of the
     *        left child node.
     *
     * @signature unsigned getLeftChildPos(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return unsigned The left child position.
     *
     * @fn RightArrayBinaryTreeIterator#getSubTreeSize
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns the number of vertices in the subtree starting at the position
     *        an iterator points to.
     *
     * @signature unsigned getSubTreeSize(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return unsigned The subtree size.
     *
     * @fn RightArrayBinaryTreeIterator#getPosition
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns the position of the iterator in the host.
     *
     * @signature unsigned getPosition(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return unsigned The position.
     *
     * @fn RightArrayBinaryTreeIterator#getRightChildPos
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Returns the position in @link RightArrayBinaryTree @endlink of the
     *        right child node.
     *
     * @signature unsigned getLeftChildPos(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return unsigned The left child position.
     *
     * @fn RightArrayBinaryTreeIterator#goDown
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Iterates down the leftmost edge in a @link RightArrayBinaryTree
     *        @endlink.
     *
     * @signature bool goDown(iterator);
     *
     * @param[in] iterator The iterator
     *
     * @return bool <tt>true</tt> if an edge to go down exists, otherwise
     *              <tt>false</tt>.
     *
     * @fn RightArrayBinaryTreeIterator#goLeftChild
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Sets the iterator to the left child of the current node if it exists
     *        and returns true, otherwise the iterator does not change position and
     *        the function returns false.
     *
     * @signature bool goLeftChild(iterator);
     *
     * @param[in] iterator The iterator
     *
     * @return bool <tt>true</tt> if the edge to go down exists, otherwise
     *              <tt>false</tt>.
     *
     * @fn RightArrayBinaryTreeIterator#goRight
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Iterates to the next sibling in a @link RightArrayBinaryTree @endlink.
     *
     * @signature bool goRight(iterator);
     *
     * @param[in] iterator The iterator
     *
     * @return bool <tt>true</tt> if the iterator could be moved, otherwise
     *              <tt>false</tt>.
     *
     * @fn RightArrayBinaryTreeIterator#goRightChild
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Sets the iterator to the right child of the current node if it exists
     *        and returns true, otherwise the iterator does not change position and
     *        the function returns false.
     *
     * @signature bool goRightChild(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return bool <tt>true</tt> if the edge to go down exists, otherwise
     *              <tt>false</tt>.
     *
     * @fn RightArrayBinaryTreeIterator#goUp
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Iterates up one edge to the parent in a @link RightArrayBinaryTree
     *        @endlink.
     *
     * @signature bool goUp(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return bool <tt>true</tt> if the iterator could be moved, otherwise
     *              <tt>false</tt>.
     *
     * @fn RightArrayBinaryTreeIterator#isLeaf
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Tests whether a given node is a leaf or not.
     *
     * @signature bool isLeaf(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return bool <tt>true</tt> if the node is a leaf.
     *
     * @fn RightArrayBinaryTreeIterator#setCharacter
     *
     * @headerfile <seqan/index.h>
     *
     * @brief The function sets the character of the node the iterator points to to
     *        character.
     *
     * @signature void setCharacter(iterator, character);
     *
     * @param[in,out] iterator The iterator.
     * @param[in] character The character to be assigned to a node.
     *
     * @fn RightArrayBinaryTreeIterator#isRoot
     *
     * @headerfile <seqan/index.h>
     *
     * @brief Test whether a iterator points to the root node.
     *
     * @signature bool isRoot(iterator);
     *
     * @param[in] iterator The iterator.
     *
     * @return bool <tt>true</tt> if <tt>iterator</tt> points to the root of the
     *              tree, otherwise <tt>false</tt>.
     */