Rosetta 3.3
Classes | Namespaces
src/utility/LexicographicalIterator.hh File Reference

Class for iterating across all words of a fixed-length, composed of letters from varying alphabets, where each alphabet is represented by its size. This iteration is performed in lexicographical order. More...

#include <utility/LexicographicalIterator.fwd.hh>
#include <utility/vector1.hh>

Classes

class  utility::LexicographicalIterator

Namespaces

namespace  utility
 

unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 1.



Detailed Description

Class for iterating across all words of a fixed-length, composed of letters from varying alphabets, where each alphabet is represented by its size. This iteration is performed in lexicographical order.

E.g, All four letter words from the english alphabet could be iterated across by instantiating an element of this class, handing in its constructor a vector1 of size 4, where each element held 26. The first word "AAAA" would be represented by "1,1,1,1". The word "MINI" would be represented by the numeral string "13,9,14,9" and would be the 210,912 + 5408 + 338 + 8 = 216,666th word encountered in the iteration.

Author:
Andrew Leaver-Fay (aleaverfay@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines