Function
isRoot
Test whether a tree iterator points to the root node.
bool isRoot(iterator)
Include Headers
seqan/index.h
Parameters
iterator
An iterator of a tree.
Return Values
true if iterator points to the root of the tree, otherwise false.
Types: bool
Examples
The following example shows the usage of the isRoot function.
1#include <seqan/index.h>
2
3using namespace seqan;
4
5int main ()
6{
7    typedef Index<CharString> TIndex;
8    TIndex index("TATAA");
9
10    Iterator<TIndex, BottomUp<Postorder> >::Type itDefault;
11    itDefault = begin(index, BottomUp<Postorder>());
12
13    while(!isRoot(itDefault))
14    {
15        std::cout << representative(itDefault) << std::endl;
16        goNext(itDefault);
17    }
18
19    return 0;
20}
AA
ATAA
A
TAA
TATAA
TA
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:36