| Function countChildren Count the number of children of a tree node. countChildren(iterator) Include Headers seqan/index.h Parameters
iterator | An iterator of a suffix tree. Types: VSTree Iterator
Return Values The number of children of a tree node. If iterator's container type is TIndex, the return type is Size<TIndex>::Type. Member of VSTree Iterator Examples // this code is in seqan/index/index_esa_stree.h typedef Index< String<char> > TMyIndex; TMyIndex myIndex(myString); Iterator< TMyIndex, TopDown<ParentLinks<PreorderEmptyEdges> > >::Type tdIterator(myIndex); Size<TMyIndex>::Type count; while (!atEnd(tdIterator)) { // We print out the representatives of all nodes that have more than 3 children and the number of occurrences. count = countChildren(tdIterator); if (count >= 3) { ::std::cout << "Representative " << representative(tdIterator) << " has " << count << " children and " << countOccurrences(tdIterator) << " Occurrences " << ::std::endl; ++tdIterator; } Example Programs Index countChildren SeqAn - Sequence Analysis Library - www.seqan.de

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