
Public Member Functions | |
| CWordFeatures (int32_t size=0, int32_t num_symbols=(1<< 16)) | |
| CWordFeatures (const CWordFeatures &orig) | |
| CWordFeatures (uint16_t *src, int32_t num_feat, int32_t num_vec) | |
| CWordFeatures (char *fname, int32_t num_sym=(1<< 16)) | |
| virtual | ~CWordFeatures () |
| bool | obtain_from_char_features (CCharFeatures *cf, int32_t start, int32_t order, int32_t gap=0) |
| virtual void | get_fm (uint16_t **dst, int32_t *d1, int32_t *d2) |
| virtual void | copy_feature_matrix (uint16_t *src, int32_t num_feat, int32_t num_vec) |
| virtual bool | load (char *fname) |
| virtual bool | save (char *fname) |
| int32_t | get_num_symbols () |
| int32_t | get_original_num_symbols () |
| int32_t | get_order () |
| uint16_t | get_masked_symbols (uint16_t symbol, uint8_t mask) |
Protected Member Functions | |
| void | translate_from_single_order (uint16_t *obs, int32_t sequence_length, int32_t start, int32_t order, int32_t max_val, int32_t gap=0) |
Protected Attributes | |
| int32_t | num_symbols |
| number of used symbols | |
| int32_t | original_num_symbols |
| original number of used symbols (before higher order mapping) | |
| int32_t | order |
| order used in higher order mapping | |
| uint16_t * | symbol_mask_table |
| order used in higher order mapping | |
Definition at line 23 of file WordFeatures.h.
| CWordFeatures::CWordFeatures | ( | int32_t | size = 0, |
|
| int32_t | num_symbols = (1<<16) | |||
| ) |
constructor
| size | cache size | |
| num_symbols | number of symbols |
Definition at line 16 of file WordFeatures.cpp.
| CWordFeatures::CWordFeatures | ( | const CWordFeatures & | orig | ) |
copy constructor
Definition at line 22 of file WordFeatures.cpp.
| CWordFeatures::CWordFeatures | ( | uint16_t * | src, | |
| int32_t | num_feat, | |||
| int32_t | num_vec | |||
| ) |
constructor that copies feature matrix from pointer num_feat,num_vec pair
| src | feature matrix to copy | |
| num_feat | number of features | |
| num_vec | number of vectors |
Definition at line 43 of file WordFeatures.h.
| CWordFeatures::CWordFeatures | ( | char * | fname, | |
| int32_t | num_sym = (1<<16) | |||
| ) |
constructor
| fname | filename to load features from | |
| num_sym | number of symbols |
Definition at line 27 of file WordFeatures.cpp.
| CWordFeatures::~CWordFeatures | ( | ) | [virtual] |
Definition at line 33 of file WordFeatures.cpp.
| virtual void CWordFeatures::copy_feature_matrix | ( | uint16_t * | src, | |
| int32_t | num_feat, | |||
| int32_t | num_vec | |||
| ) | [virtual] |
copy feature matrix
wrapper to base class' method
| src | feature matrix to copy | |
| num_feat | number of features | |
| num_vec | number of vectors |
Reimplemented from CSimpleFeatures< uint16_t >.
Definition at line 89 of file WordFeatures.h.
| virtual void CWordFeatures::get_fm | ( | uint16_t ** | dst, | |
| int32_t * | d1, | |||
| int32_t * | d2 | |||
| ) | [virtual] |
get feature matrix
| dst | destination where matrix will be stored | |
| d1 | dimension 1 of matrix | |
| d2 | dimension 2 of matrix |
Reimplemented from CSimpleFeatures< uint16_t >.
Definition at line 75 of file WordFeatures.h.
| uint16_t CWordFeatures::get_masked_symbols | ( | uint16_t | symbol, | |
| uint8_t | mask | |||
| ) |
a higher order mapped symbol will be shaped such that the symbols in specified by bits in the mask will be returned.
| symbol | symbol to mask | |
| mask | mask to apply |
Definition at line 135 of file WordFeatures.h.
| int32_t CWordFeatures::get_num_symbols | ( | ) |
| int32_t CWordFeatures::get_order | ( | ) |
| int32_t CWordFeatures::get_original_num_symbols | ( | ) |
number of symbols before higher order mapping
Definition at line 120 of file WordFeatures.h.
| bool CWordFeatures::load | ( | char * | fname | ) | [virtual] |
load features from file
| fname | filename to load from |
Reimplemented from CFeatures.
Definition at line 192 of file WordFeatures.cpp.
| bool CWordFeatures::obtain_from_char_features | ( | CCharFeatures * | cf, | |
| int32_t | start, | |||
| int32_t | order, | |||
| int32_t | gap = 0 | |||
| ) |
obtain from char features
| cf | char features | |
| start | start | |
| order | order | |
| gap | gap |
Definition at line 38 of file WordFeatures.cpp.
| bool CWordFeatures::save | ( | char * | fname | ) | [virtual] |
save features to file
| fname | filename to save to |
Reimplemented from CFeatures.
Definition at line 197 of file WordFeatures.cpp.
| void CWordFeatures::translate_from_single_order | ( | uint16_t * | obs, | |
| int32_t | sequence_length, | |||
| int32_t | start, | |||
| int32_t | order, | |||
| int32_t | max_val, | |||
| int32_t | gap = 0 | |||
| ) | [protected] |
translate from single order
| obs | observation | |
| sequence_length | length of sequence | |
| start | start | |
| order | order | |
| max_val | how many bits does the largest symbol require to be stored without loss | |
| gap | gap |
Definition at line 136 of file WordFeatures.cpp.
int32_t CWordFeatures::num_symbols [protected] |
int32_t CWordFeatures::order [protected] |
int32_t CWordFeatures::original_num_symbols [protected] |
original number of used symbols (before higher order mapping)
Definition at line 159 of file WordFeatures.h.
uint16_t* CWordFeatures::symbol_mask_table [protected] |