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. Types: AnnotationTree Iterator, VSTree Iterator

Return Values
true if iterator points to the root of the tree, otherwise false.
Types: bool
Member of
AnnotationTree Iterator, VSTree Iterator
Examples
The following example shows the usage of the isRoot function.
File "index_begin_atEnd_representative_bottomUp.cpp"

1 | #include <seqan/index.h>
2 |
3 | using namespace seqan;
4 |
5 | int 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 @2014/10/13 16:12:58