Class RightArrayBinaryTree
A special format to encode the structure of a wavelet tree. The structure is very space efficient because only one position is stored which encodes where the left and right subtree of a given node exist.

Defined in <seqan/index.h>
Signature template <typename TChar, typename TSpec> class RightArrayBinaryTree;

Template Parameters

TValue The type of the stored characters.
TSpec The wavelet tree structure specialisation. Default: void.

Interface Function Overview

Interface Functions Detail

TIterator begin(rightArrayBinaryTree, iterSpec);

The begin (root) of a RightArrayBinaryTree.

Parameters

rightArrayBinaryTree The right-array-binary tree.
iterSpec A specialisation tag. Types: TopDown<>, TopDown<ParentLinks<> >.

Returns

TIterator An iterator to the first item in object. Metafunctions: Metafunction.Iterator

Data Races

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

void clear(rightArrayBinaryTree);

Resets a right-array-binary tree.

Parameters

rightArrayBinaryTree The RightArrayBinaryTree to be cleared.

Data Races

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

void createRightArrayBinaryTree(rightArrayBinaryTree, text);

Computes the right-array-binary tree of a text.

Parameters

rightArrayBinaryTree A wavelet tree structure.
text A text.

Data Races

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

bool empty(rightArrayBinaryTree);

Checks whether or not a right-array-binary tree contains any elements.

Parameters

rightArrayBinaryTree The right-array-binary tree to be queried.

Returns

bool Returns true if the rank-support-bit string is empty and false otherwise.

Data Races

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

TIterator end(rightArrayBinaryTree, iterSpec);

The end (rigthmost leaf) of a RightArrayBinaryTree.

Parameters

rightArrayBinaryTree The right-array-binary tree.
iterSpec A specialisation tag. Types: TopDown<>, TopDown<ParentLinks<> >.

Returns

TIterator An iterator to the first item in object. Metafunctions: Metafunction.Iterator

Data Races

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

TFibre getFibre(rightArrayBinaryTree, fibreTag);

Returns a specific fibre of a right-array-binary tree.

Parameters

rightArrayBinaryTree The container holding the fibre.
fibreTag A tag that identifies the Fibre. Types: RightArrayBinaryTree Fibres.

Returns

TFibre A reference to the Fibre object.

Data Races

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

TSize length(rightArrayBinaryTree);

Returns the number of nodes in the right-array-binary-tree.

Parameters

tree The right-array-binary-tree to query for its size.

Returns

TSize The number of nodes in the right-array-binary-tree.

Data Races

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

bool open(rightArrayBinaryTree, fileName [, openMode])

This functions loads a RightArrayBinaryTree from disk.

Parameters

rightArrayBinaryTree The RightArrayBinaryTree.
fileName C-style character string containing the file name.
openMode The combination of flags defining how the file should be opened. To open a file read-only, write-only or to read and write use OPEN_RDONLY, OPEN_WRONLY, or OPEN_RDWR. To create or overwrite a file add OPEN_CREATE. To append a file if existing add OPEN_APPEND. To circumvent problems, files are always opened in binary mode. Default: OPEN_RDWR | OPEN_CREATE | OPEN_APPEND.

Returns

bool A bool which is true on success.

Data Races

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

bool save(rightArrayBinaryTree, fileName [, openMode])

This functions saves a RightArrayBinaryTree to disk.

Parameters

rightArrayBinaryTree The RightArrayBinaryTree.
fileName C-style character string containing the file name.
openMode The combination of flags defining how the file should be opened. To open a file read-only, write-only or to read and write use OPEN_RDONLY, OPEN_WRONLY, or OPEN_RDWR. To create or overwrite a file add OPEN_CREATE. To append a file if existing add OPEN_APPEND. To circumvent problems, files are always opened in binary mode. Default: OPEN_RDWR | OPEN_CREATE | OPEN_APPEND.

Returns

bool A bool which is true on success.

Data Races

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