
Definition at line 20 of file WordFeatures.h.
Public Member Functions | |
| CWordFeatures (INT size=0, INT num_symbols=(1<< 16)) | |
| CWordFeatures (const CWordFeatures &orig) | |
| CWordFeatures (WORD *src, INT num_feat, INT num_vec) | |
| CWordFeatures (CHAR *fname, INT num_sym=(1<< 16)) | |
| virtual | ~CWordFeatures () |
| bool | obtain_from_char_features (CCharFeatures *cf, INT start, INT order, INT gap=0) |
| virtual void | copy_feature_matrix (WORD *src, INT num_feat, INT num_vec) |
| virtual bool | load (CHAR *fname) |
| virtual bool | save (CHAR *fname) |
| INT | get_num_symbols () |
| INT | get_original_num_symbols () |
| INT | get_order () |
| WORD | get_masked_symbols (WORD symbol, BYTE mask) |
| virtual CFeatures * | duplicate () const |
| void | free_feature_matrix () |
| void | free_features () |
| ST * | get_feature_vector (INT num, INT &len, bool &dofree) |
| void | free_feature_vector (ST *feat_vec, INT num, bool dofree) |
| void | get_fm (ST **dst, INT *d1, INT *d2) |
| ST * | get_feature_matrix (INT &num_feat, INT &num_vec) |
| virtual void | set_feature_matrix (ST *fm, INT num_feat, INT num_vec) |
| virtual void | copy_feature_matrix (ST *src, INT num_feat, INT num_vec) |
| virtual bool | apply_preproc (bool force_preprocessing=false) |
| virtual INT | get_size () |
| virtual INT | get_num_vectors () |
| INT | get_num_features () |
| void | set_num_features (INT num) |
| void | set_num_vectors (INT num) |
| virtual EFeatureClass | get_feature_class () |
| virtual EFeatureType | get_feature_type () |
| template<> | |
| EFeatureType | get_feature_type () |
| template<> | |
| EFeatureType | get_feature_type () |
| template<> | |
| EFeatureType | get_feature_type () |
| template<> | |
| EFeatureType | get_feature_type () |
| template<> | |
| EFeatureType | get_feature_type () |
| template<> | |
| EFeatureType | get_feature_type () |
| template<> | |
| EFeatureType | get_feature_type () |
| template<> | |
| EFeatureType | get_feature_type () |
| virtual bool | reshape (INT p_num_features, INT p_num_vectors) |
| virtual INT | add_preproc (CPreProc *p) |
| set preprocessor | |
| virtual CPreProc * | del_preproc (INT num) |
| del current preprocessor | |
| CPreProc * | get_preproc (INT num) |
| get current preprocessor | |
| void | set_preprocessed (INT num) |
| bool | is_preprocessed (INT num) |
| INT | get_num_preprocessed () |
| get whether specified preprocessor (or all if num=1) was/were already applied | |
| INT | get_num_preproc () |
| void | clean_preprocs () |
| clears all preprocs | |
| INT | get_cache_size () |
| void | list_feature_obj () |
| bool | check_feature_compatibility (CFeatures *f) |
Static Public Attributes | |
| static CParallel | parallel |
| static CIO | io |
| static CVersion | version |
Protected Member Functions | |
| void | translate_from_single_order (WORD *obs, INT sequence_length, INT start, INT order, INT max_val, INT gap=0) |
| virtual ST * | compute_feature_vector (INT num, INT &len, ST *target=NULL) |
Protected Attributes | |
| INT | num_symbols |
| number of used symbols | |
| INT | original_num_symbols |
| original number of used symbols (before higher order mapping) | |
| INT | order |
| order used in higher order mapping | |
| WORD * | symbol_mask_table |
| order used in higher order mapping | |
| INT | num_vectors |
| number of vectors in cache | |
| INT | num_features |
| number of features in cache | |
| ST * | feature_matrix |
| CCache< ST > * | feature_cache |
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.
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 40 of file WordFeatures.h.
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.
| bool CWordFeatures::obtain_from_char_features | ( | CCharFeatures * | cf, | |
| INT | start, | |||
| INT | order, | |||
| INT | gap = 0 | |||
| ) |
obtain from char features
| cf | char features | |
| start | start | |
| order | order | |
| gap | gap |
Definition at line 38 of file WordFeatures.cpp.
copy feature matrix
wrapper to base class' method
| src | feature matrix to copy | |
| num_feat | number of features | |
| num_vec | number of vectors |
Definition at line 74 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 190 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 195 of file WordFeatures.cpp.
| INT CWordFeatures::get_num_symbols | ( | ) |
| INT CWordFeatures::get_original_num_symbols | ( | ) |
number of symbols before higher order mapping
Definition at line 105 of file WordFeatures.h.
| INT CWordFeatures::get_order | ( | ) |
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 120 of file WordFeatures.h.
| void CWordFeatures::translate_from_single_order | ( | WORD * | obs, | |
| INT | sequence_length, | |||
| INT | start, | |||
| INT | order, | |||
| INT | max_val, | |||
| INT | 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 135 of file WordFeatures.cpp.
| virtual CFeatures* CSimpleFeatures< ST >::duplicate | ( | ) | const [virtual, inherited] |
duplicate feature object
Implements CFeatures.
Definition at line 83 of file SimpleFeatures.h.
| void CSimpleFeatures< ST >::free_feature_matrix | ( | ) | [inherited] |
free feature matrix
Definition at line 97 of file SimpleFeatures.h.
| void CSimpleFeatures< ST >::free_features | ( | ) | [inherited] |
free feature matrix and cache
Definition at line 108 of file SimpleFeatures.h.
| ST* CSimpleFeatures< ST >::get_feature_vector | ( | INT | num, | |
| INT & | len, | |||
| bool & | dofree | |||
| ) | [inherited] |
get feature vector for sample num from the matrix as it is if matrix is initialized, else return preprocessed compute_feature_vector
| num | index of feature vector | |
| len | length is returned by reference | |
| dofree | whether returned vector must be freed by caller via free_feature_vector |
Definition at line 125 of file SimpleFeatures.h.
| void CSimpleFeatures< ST >::free_feature_vector | ( | ST * | feat_vec, | |
| INT | num, | |||
| bool | dofree | |||
| ) | [inherited] |
free feature vector
| feat_vec | feature vector to free | |
| num | index in feature cache | |
| dofree | if vector should be really deleted |
Definition at line 189 of file SimpleFeatures.h.
| void CSimpleFeatures< ST >::get_fm | ( | ST ** | dst, | |
| INT * | d1, | |||
| INT * | d2 | |||
| ) | [inherited] |
get the pointer to the feature matrix num_feat,num_vectors are returned by reference
| dst | destination to store matrix in | |
| d1 | dimension 1 of matrix | |
| d2 | dimension 2 of matrix |
Definition at line 205 of file SimpleFeatures.h.
| ST* CSimpleFeatures< ST >::get_feature_matrix | ( | INT & | num_feat, | |
| INT & | num_vec | |||
| ) | [inherited] |
get the pointer to the feature matrix num_feat,num_vectors are returned by reference
| num_feat | number of features in matrix | |
| num_vec | number of vectors in matrix |
Definition at line 223 of file SimpleFeatures.h.
| virtual void CSimpleFeatures< ST >::set_feature_matrix | ( | ST * | fm, | |
| INT | num_feat, | |||
| INT | num_vec | |||
| ) | [virtual, inherited] |
set feature matrix necessary to set feature_matrix, num_features, num_vectors, where num_features is the column offset, and columns are linear in memory see below for definition of feature_matrix
| fm | feature matrix to se | |
| num_feat | number of features in matrix | |
| num_vec | number of vectors in matrix |
Definition at line 240 of file SimpleFeatures.h.
| virtual void CSimpleFeatures< ST >::copy_feature_matrix | ( | ST * | src, | |
| INT | num_feat, | |||
| INT | num_vec | |||
| ) | [virtual, inherited] |
copy feature matrix store copy of feature_matrix, where num_features is the column offset, and columns are linear in memory see below for definition of feature_matrix
| src | feature matrix to copy | |
| num_feat | number of features in matrix | |
| num_vec | number of vectors in matrix |
Definition at line 257 of file SimpleFeatures.h.
| virtual bool CSimpleFeatures< ST >::apply_preproc | ( | bool | force_preprocessing = false |
) | [virtual, inherited] |
apply preprocessor
| force_preprocessing | if preprocssing shall be forced |
Definition at line 272 of file SimpleFeatures.h.
| virtual INT CSimpleFeatures< ST >::get_size | ( | ) | [virtual, inherited] |
get memory footprint of one feature
Implements CFeatures.
Definition at line 308 of file SimpleFeatures.h.
| virtual INT CSimpleFeatures< ST >::get_num_vectors | ( | ) | [virtual, inherited] |
get number of feature vectors
Implements CFeatures.
Definition at line 315 of file SimpleFeatures.h.
| INT CSimpleFeatures< ST >::get_num_features | ( | ) | [inherited] |
| void CSimpleFeatures< ST >::set_num_features | ( | INT | num | ) | [inherited] |
set number of features
| num | number to set |
Definition at line 327 of file SimpleFeatures.h.
| void CSimpleFeatures< ST >::set_num_vectors | ( | INT | num | ) | [inherited] |
set number of vectors
| num | number to set |
Definition at line 342 of file SimpleFeatures.h.
| virtual EFeatureClass CSimpleFeatures< ST >::get_feature_class | ( | ) | [virtual, inherited] |
get feature class
Implements CFeatures.
Definition at line 356 of file SimpleFeatures.h.
| virtual EFeatureType CSimpleFeatures< ST >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
| EFeatureType CSimpleFeatures< DREAL >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the DREAL feature can deal with
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
Definition at line 417 of file SimpleFeatures.h.
| EFeatureType CSimpleFeatures< SHORTREAL >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the SHORTREAL feature can deal with
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
Definition at line 426 of file SimpleFeatures.h.
| EFeatureType CSimpleFeatures< SHORT >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the SHORT feature can deal with
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
Definition at line 435 of file SimpleFeatures.h.
| EFeatureType CSimpleFeatures< CHAR >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the CHAR feature can deal with
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
Definition at line 444 of file SimpleFeatures.h.
| EFeatureType CSimpleFeatures< BYTE >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the BYTE feature can deal with
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
Definition at line 453 of file SimpleFeatures.h.
| EFeatureType CSimpleFeatures< INT >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the INT feature can deal with
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
Definition at line 462 of file SimpleFeatures.h.
| EFeatureType CSimpleFeatures< WORD >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the WORD feature can deal with
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
Definition at line 471 of file SimpleFeatures.h.
| EFeatureType CSimpleFeatures< ULONG >::get_feature_type | ( | ) | [virtual, inherited] |
get feature type the ULONG feature can deal with
Implements CFeatures.
Reimplemented in CByteFeatures, and CShortFeatures.
Definition at line 480 of file SimpleFeatures.h.
| virtual bool CSimpleFeatures< ST >::reshape | ( | INT | p_num_features, | |
| INT | p_num_vectors | |||
| ) | [virtual, inherited] |
reshape
| p_num_features | new number of features | |
| p_num_vectors | new number of vectors |
Reimplemented from CFeatures.
Definition at line 370 of file SimpleFeatures.h.
| virtual ST* CSimpleFeatures< ST >::compute_feature_vector | ( | INT | num, | |
| INT & | len, | |||
| ST * | target = NULL | |||
| ) | [protected, virtual, inherited] |
compute feature vector for sample num if target is set the vector is written to target len is returned by reference
NOT IMPLEMENTED!
| num | num | |
| len | len | |
| target |
Definition at line 394 of file SimpleFeatures.h.
set preprocessor
add preprocessor
| p | preprocessor to set |
Definition at line 48 of file Features.cpp.
del current preprocessor
delete preprocessor from list caller has to clean up returned preproc
| num | index of preprocessor in list |
Definition at line 107 of file Features.cpp.
get current preprocessor
get specified preprocessor
| num | index of preprocessor in list |
Definition at line 78 of file Features.cpp.
| void CFeatures::set_preprocessed | ( | INT | num | ) | [inherited] |
set applied flag for preprocessor
| num | index of preprocessor in list |
Definition at line 95 of file Features.h.
| bool CFeatures::is_preprocessed | ( | INT | num | ) | [inherited] |
get whether specified preprocessor was already applied
| num | index of preprocessor in list |
Definition at line 101 of file Features.h.
| INT CFeatures::get_num_preprocessed | ( | ) | [inherited] |
get whether specified preprocessor (or all if num=1) was/were already applied
get the number of applied preprocs
Definition at line 87 of file Features.cpp.
| INT CFeatures::get_num_preproc | ( | ) | [inherited] |
get number of preprocessors
Definition at line 113 of file Features.h.
| void CFeatures::clean_preprocs | ( | ) | [inherited] |
| INT CFeatures::get_cache_size | ( | ) | [inherited] |
| void CFeatures::list_feature_obj | ( | ) | [inherited] |
list feature object
Definition at line 152 of file Features.cpp.
| bool CFeatures::check_feature_compatibility | ( | CFeatures * | f | ) | [inherited] |
check feature compatibility
| f | features to check for compatibility |
Definition at line 223 of file Features.cpp.
INT CWordFeatures::num_symbols [protected] |
INT CWordFeatures::original_num_symbols [protected] |
original number of used symbols (before higher order mapping)
Definition at line 144 of file WordFeatures.h.
INT CWordFeatures::order [protected] |
WORD* CWordFeatures::symbol_mask_table [protected] |
INT CSimpleFeatures< ST >::num_vectors [protected, inherited] |
INT CSimpleFeatures< ST >::num_features [protected, inherited] |
ST* CSimpleFeatures< ST >::feature_matrix [protected, inherited] |
feature matrix
Definition at line 407 of file SimpleFeatures.h.
CCache<ST>* CSimpleFeatures< ST >::feature_cache [protected, inherited] |
feature cache
Definition at line 410 of file SimpleFeatures.h.
CParallel CSGObject::parallel [static, inherited] |
Definition at line 105 of file SGObject.h.
CIO CSGObject::io [static, inherited] |
Definition at line 106 of file SGObject.h.
CVersion CSGObject::version [static, inherited] |
Definition at line 107 of file SGObject.h.