Preprocessor SortWordString, sorts the indivual strings in ascending order.
This is useful in conjunction with the CCommWordStringKernel and will result in the spectrum kernel. For this to work the strings have to be mapped into a binary higher order representation first (cf. obtain_from_*() functions in CStringFeatures)
Definition at line 27 of file SortWordString.h.
Public Member Functions | |
CSortWordString () | |
virtual | ~CSortWordString () |
virtual bool | init (CFeatures *f) |
initialize preprocessor from features | |
virtual bool | load_init_data (FILE *src) |
initialize preprocessor from file | |
virtual bool | save_init_data (FILE *dst) |
save init-data (like transforamtion matrices etc) to file | |
virtual void | cleanup () |
cleanup | |
virtual bool | load (FILE *f) |
initialize preprocessor from file | |
virtual bool | save (FILE *f) |
save preprocessor init-data to file | |
virtual bool | apply_to_string_features (CFeatures *f) |
virtual uint16_t * | apply_to_string (uint16_t *f, int32_t &len) |
apply preproc on single feature vector | |
virtual const char * | get_name () |
CSortWordString::CSortWordString | ( | ) |
default constructor
Definition at line 16 of file SortWordString.cpp.
CSortWordString::~CSortWordString | ( | ) | [virtual] |
Definition at line 21 of file SortWordString.cpp.
uint16_t * CSortWordString::apply_to_string | ( | uint16_t * | f, | |
int32_t & | len | |||
) | [virtual] |
apply preproc on single feature vector
apply preproc on single feature vector result in feature matrix
Implements CStringPreProc< uint16_t >.
Definition at line 71 of file SortWordString.cpp.
bool CSortWordString::apply_to_string_features | ( | CFeatures * | f | ) | [virtual] |
apply preproc on feature matrix result in feature matrix return pointer to feature_matrix, i.e. f->get_feature_matrix();
Implements CStringPreProc< uint16_t >.
Definition at line 54 of file SortWordString.cpp.
void CSortWordString::cleanup | ( | ) | [virtual] |
cleanup
clean up allocated memory
Implements CPreProc.
Definition at line 35 of file SortWordString.cpp.
virtual const char* CSortWordString::get_name | ( | ) | [virtual] |
Definition at line 58 of file SortWordString.h.
bool CSortWordString::init | ( | CFeatures * | f | ) | [virtual] |
initialize preprocessor from features
Implements CPreProc.
Definition at line 26 of file SortWordString.cpp.
bool CSortWordString::load | ( | FILE * | f | ) | [virtual] |
initialize preprocessor from file
Definition at line 40 of file SortWordString.cpp.
bool CSortWordString::load_init_data | ( | FILE * | src | ) | [virtual] |
initialize preprocessor from file
Implements CPreProc.
Definition at line 86 of file SortWordString.cpp.
bool CSortWordString::save | ( | FILE * | f | ) | [virtual] |
save preprocessor init-data to file
Definition at line 46 of file SortWordString.cpp.
bool CSortWordString::save_init_data | ( | FILE * | dst | ) | [virtual] |
save init-data (like transforamtion matrices etc) to file
Implements CPreProc.
Definition at line 92 of file SortWordString.cpp.