Preprocessor SortUlongString, sorts the indivual strings in ascending order.
This is useful in conjunction with the CCommUlongStringKernel 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 28 of file SortUlongString.h.
Public Member Functions | |
CSortUlongString () | |
virtual | ~CSortUlongString () |
virtual bool | init (CFeatures *f) |
initialize preprocessor from features | |
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 uint64_t * | apply_to_string (uint64_t *f, int32_t &len) |
apply preproc on single feature vector | |
virtual const char * | get_name () const |
virtual EPreprocessorType | get_type () const |
return a type of preprocessor |
CSortUlongString | ( | ) |
default constructor
Definition at line 19 of file SortUlongString.cpp.
~CSortUlongString | ( | ) | [virtual] |
destructor
Definition at line 24 of file SortUlongString.cpp.
uint64_t * apply_to_string | ( | uint64_t * | f, | |
int32_t & | len | |||
) | [virtual] |
apply preproc on single feature vector
apply preproc on single feature vector result in feature matrix
Implements CStringPreprocessor< uint64_t >.
Definition at line 83 of file SortUlongString.cpp.
bool apply_to_string_features | ( | CFeatures * | f | ) | [virtual] |
apply preproc to feature matrix result in feature matrix return pointer to feature_matrix, i.e. f->get_feature_matrix();
apply preproc on feature matrix result in feature matrix return pointer to feature_matrix, i.e. f->get_feature_matrix();
Implements CStringPreprocessor< uint64_t >.
Definition at line 61 of file SortUlongString.cpp.
void cleanup | ( | ) | [virtual] |
cleanup
clean up allocated memory
Implements CPreprocessor.
Definition at line 38 of file SortUlongString.cpp.
virtual const char* get_name | ( | void | ) | const [virtual] |
Reimplemented from CStringPreprocessor< uint64_t >.
Definition at line 56 of file SortUlongString.h.
virtual EPreprocessorType get_type | ( | ) | const [virtual] |
return a type of preprocessor
Reimplemented from CStringPreprocessor< uint64_t >.
Definition at line 59 of file SortUlongString.h.
bool init | ( | CFeatures * | f | ) | [virtual] |
initialize preprocessor from features
Implements CPreprocessor.
Definition at line 29 of file SortUlongString.cpp.
bool load | ( | FILE * | f | ) | [virtual] |
initialize preprocessor from file
Definition at line 43 of file SortUlongString.cpp.
bool save | ( | FILE * | f | ) | [virtual] |
save preprocessor init-data to file
Definition at line 51 of file SortUlongString.cpp.