Tag
TopDown
Tag that specifies a VSTree Iterator to traverse the virtual string tree from the root towards the leafs.
Tags

Preorder | Pre-order traversal of the virtual string tree.
Postorder | Post-order traversal of the virtual string tree.
ParentLinks | A top down iterator with the possibility to go back up again.

Examples
The following example shows how a the TopDown tag is used.
File "index_begin_atEnd_representative.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, TopDown<ParentLinks<> > >::Type itDefault;
11 | itDefault = begin(index, TopDown<ParentLinks<> >());
12 |
13 | while(!atEnd(itDefault))
14 | {
15 | std::cout << representative(itDefault) << std::endl;
16 | goNext(itDefault);
17 | }
18 |
19 | std::cout << "--------------------------------" << std::endl;
20 |
21 | Iterator<TIndex, TopDown<ParentLinks<Postorder> > >::Type itPostOrder;
22 | itPostOrder = begin(index, TopDown<ParentLinks<Postorder> >());
23 |
24 | while(!atEnd(itPostOrder))
25 | {
26 | std::cout << representative(itPostOrder) << std::endl;
27 | goNext(itPostOrder);
28 | };
29 |
30 | return 0;
31 | }

A
AA
ATAA
TA
TAA
TATAA
--------------------------------
AA
ATAA
A
TAA
TATAA
TA
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:13:00