11 #ifndef _CALPHABET__H__
12 #define _CALPHABET__H__
185 for (int64_t i=0; i<len; i++)
261 virtual const char*
get_name()
const {
return "Alphabet"; }
295 static void translate_from_single_order(ST* obs, int32_t sequence_length, int32_t start, int32_t p_order, int32_t max_val, int32_t gap);
bool valid_chars[1<< (sizeof(uint8_t)*8)]
int32_t get_num_symbols_in_histogram()
int32_t get_num_bits_in_histogram()
static const char * get_alphabet_name(EAlphabet alphabet)
RAWDNA - letters 0,1,2,3.
void copy_histogram(CAlphabet *src)
uint8_t maptable_to_bin[1<< (sizeof(uint8_t)*8)]
EAlphabet
Alphabet of charfeatures/observations.
int32_t get_max_value_in_histogram()
bool check_alphabet_size(bool print_error=true)
Class ShogunException defines an exception which is thrown whenever an error inside of shogun occurs...
void print_histogram()
print histogram
EAlphabet get_alphabet() const
static void translate_from_single_order(ST *obs, int32_t sequence_length, int32_t start, int32_t p_order, int32_t max_val)
The class Alphabet implements an alphabet and alphabet utility functions.
virtual const char * get_name() const
void add_byte_to_histogram(uint8_t p)
static const uint8_t MAPTABLE_UNDEF
static const char * alphabet_names[18]
virtual void load_serializable_post()
uint8_t remap_to_bin(uint8_t c)
void add_string_to_histogram(T *p, int64_t len)
static void translate_from_single_order_reversed(ST *obs, int32_t sequence_length, int32_t start, int32_t p_order, int32_t max_val)
Class SGObject is the base class of all shogun objects.
RAWSNP - letters 0,1,2,3,4.
int32_t get_num_symbols() const
uint8_t maptable_to_char[1<< (sizeof(uint8_t)*8)]
bool set_alphabet(EAlphabet alpha)
NONE - type has no alphabet.
void clear_histogram()
clear histogram
bool check_alphabet(bool print_error=true)
SGVector< int64_t > get_histogram()
int32_t get_num_bits() const
all of classes and functions are contained in the shogun namespace
uint8_t remap_to_char(uint8_t c)
int64_t histogram[1<< (sizeof(uint8_t)*8)]