Specifies an alphabet. More...
#include <alphabet.hh>
Public Types | |
typedef vec_t::size_type | size_type |
size type | |
typedef size_type | index_type |
type of index | |
typedef T | elem_type |
type of an alphabet element | |
typedef std::vector< T > | elem_vector_type |
vector of elements | |
typedef elem_vector_type::iterator | iterator |
iterator over alphabet elements | |
typedef elem_vector_type::const_iterator | const_iterator |
const iterator over alphabet elements | |
Public Member Functions | |
Alphabet () | |
construct empty | |
Alphabet (const elem_vector_type &a) | |
construct from vector of alphabet elements | |
Alphabet (const elem_type *s, int len) | |
construct from array of alphabet indices with given length | |
size_type | size () const |
get alphabet size | |
size_type | idx (const elem_type &elem) const |
convert element to index | |
const elem_type & | elem (size_type idx) const |
convert index to element | |
bool | in (const elem_type &elem) const |
test membership in alphabet | |
const_iterator | begin () const |
begin for const iteration over elements | |
const_iterator | end () const |
end for const iteration over elements | |
iterator | begin () |
begin for iteration over elements | |
iterator | end () |
end for iteration over elements |
Specifies an alphabet.
maintain an (ordered) alphabet and offer transformation between elements of alphabet and their indices
const elem_type& LocARNA::Alphabet< T >::elem | ( | size_type | idx | ) | const |
convert index to element
idx | index |