Function
atEnd
Determines whether an virtual string tree iterator is at the end position.
bool atEnd(iterator)
Include Headers
seqan/index.h
Parameters

iterator | An iterator. Types: RootedIteratorConcept: AnnotationTree Iterator BottomUp Iterator, TopDownHistory Iterator

Return Values
true if iterator points behind the last item of the container, otherwise false.
Member of
VSTree Iterator
Examples
The following example shows the usage of the atEnd function.
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
Part of Concept
RootedIteratorConcept
SeqAn - Sequence Analysis Library - www.seqan.de

Page built @2014/10/13 16:12:57