Concept StringTreeConcept
An index that can be traversed top-down as a tree.

Defined in <seqan/index.h>
Signature StringTreeConcept<T>

Interface Function Overview

Interface Metafunction Overview

Interface Functions Detail

TIterator begin(index, tag);

Returns an iterator pointing to the root node of a string tree index.

Parameters

index An index that implements the StringTreeConcept. Types: IndexEsa, IndexDfi, IndexWotd, FMIndex.
tag The specialisation of the iterator to be returned by the function. Types: VSTreeIterator

Returns

TIterator Returns an iterator pointing to the root node of the virtual string tree of the index. The type is the result of Iterator<Index<TText, TIndexSpec>, TSpec >::Type

Examples

The following example shows the usage of the begin function. Note that in the first case begin returns an iterator pointing to the root node, while in the second case begin returns a pointer to the left most node.

#include <seqan/index.h>

using namespace seqan;

int main()
{
    typedef Index<CharString> TIndex;
    TIndex index("TATAA");

    Iterator<TIndex, TopDown<ParentLinks<> > >::Type itDefault;
    itDefault = begin(index, TopDown<ParentLinks<> >());

    while (!atEnd(itDefault))
    {
        std::cout << representative(itDefault) << std::endl;
        goNext(itDefault);
    }

    std::cout << "--------------------------------" << std::endl;

    Iterator<TIndex, TopDown<ParentLinks<Postorder> > >::Type itPostOrder;
    itPostOrder = begin(index, TopDown<ParentLinks<Postorder> >());

    while (!atEnd(itPostOrder))
    {
        std::cout << representative(itPostOrder) << std::endl;
        goNext(itPostOrder);
    }

    return 0;
}

The output is as follows:

A
AA
ATAA
TA
TAA
TATAA
--------------------------------
AA
ATAA
A
TAA
TATAA
TA

Data Races

Thread safety unknown!

void resizeVertexMap(pm, index);

Initializes a vertex map.

Parameters

pm An External Property Map.
index An index with a string tree interface. Types: IndexEsa, IndexWotd

Data Races

Thread safety unknown!

Interface Metafunctions Detail

Iterator<TIndex, TSpec>::Type;

Returns the type of an iterator to traverse the nodes of a string tree.

Template Parameters

TIndex The index type.
TSpec The spec type of a VSTreeIterator, e.g. TopDown<> or BottomUp<>.

Returns

Type The resulting string tree iterator type.

VertexDescriptor<TIndex>::Type;

Returns the type of an object that represents a string tree node.

Template Parameters

TIndex The index type.

Returns

Type The resulting vertex descriptor type.