SHOGUN  v1.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CDecompressString< ST > Class Template Reference

Detailed Description

template<class ST>
class shogun::CDecompressString< ST >

Preprocessor that decompresses compressed strings.

Each string in CStringFeatures might be stored compressed in memory. This preprocessor decompresses these strings on the fly. This may be especially usefull for long strings and when datasets become too large to fit in memoryin uncompressed form but still when they are compressed.

Then avoiding expensive disk i/o strings are on-the-fly decompressed.

Definition at line 35 of file DecompressString.h.

Inheritance diagram for CDecompressString< ST >:
Inheritance graph
[legend]

Public Member Functions

 CDecompressString ()
 CDecompressString (E_COMPRESSION_TYPE ct)
virtual ~CDecompressString ()
virtual bool init (CFeatures *f)
 initialize preprocessor from features
virtual void cleanup ()
 cleanup
bool load (FILE *f)
 initialize preprocessor from file
bool save (FILE *f)
 save preprocessor init-data to file
virtual bool apply_to_string_features (CFeatures *f)
virtual ST * apply_to_string (ST *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 TODO: template specification of get_type
- Public Member Functions inherited from CStringPreprocessor< ST >
 CStringPreprocessor ()
virtual EFeatureClass get_feature_class ()
 return that we are string features (just fixed size matrices)
virtual EFeatureType get_feature_type ()
 return 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 ()
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 ()
- Public Member Functions inherited from CPreprocessor
 CPreprocessor ()
virtual ~CPreprocessor ()
- Public Member Functions inherited from CSGObject
 CSGObject ()
 CSGObject (const CSGObject &orig)
virtual ~CSGObject ()
virtual bool is_generic (EPrimitiveType *generic) const
template<class T >
void set_generic ()
void unset_generic ()
virtual void print_serializable (const char *prefix="")
virtual bool save_serializable (CSerializableFile *file, const char *prefix="")
virtual bool load_serializable (CSerializableFile *file, const char *prefix="")
void set_global_io (SGIO *io)
SGIOget_global_io ()
void set_global_parallel (Parallel *parallel)
Parallelget_global_parallel ()
void set_global_version (Version *version)
Versionget_global_version ()
SGVector< char * > get_modelsel_names ()
char * get_modsel_param_descr (const char *param_name)
index_t get_modsel_param_index (const char *param_name)

Protected Attributes

CCompressorcompressor

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CSGObject
virtual void load_serializable_pre () throw (ShogunException)
virtual void load_serializable_post () throw (ShogunException)
virtual void save_serializable_pre () throw (ShogunException)
virtual void save_serializable_post () throw (ShogunException)

Constructor & Destructor Documentation

default constructor

Definition at line 8 of file DecompressString.cpp.

constructor

Definition at line 14 of file DecompressString.cpp.

~CDecompressString ( )
virtual

destructor

Definition at line 20 of file DecompressString.cpp.

Member Function Documentation

ST * apply_to_string ( ST *  f,
int32_t &  len 
)
virtual

apply preproc on single feature vector

Implements CStringPreprocessor< ST >.

Definition at line 78 of file DecompressString.cpp.

bool 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 CStringPreprocessor< ST >.

Definition at line 54 of file DecompressString.cpp.

void cleanup ( )
virtual

cleanup

Implements CPreprocessor.

Definition at line 33 of file DecompressString.cpp.

virtual const char* get_name ( ) const
virtual
Returns
object name

Reimplemented from CStringPreprocessor< ST >.

Definition at line 69 of file DecompressString.h.

EPreprocessorType get_type ( ) const
virtual

return a type of preprocessor TODO: template specification of get_type

Reimplemented from CStringPreprocessor< ST >.

Definition at line 97 of file DecompressString.cpp.

bool init ( CFeatures f)
virtual

initialize preprocessor from features

Implements CPreprocessor.

Definition at line 26 of file DecompressString.cpp.

bool load ( FILE *  f)

initialize preprocessor from file

Definition at line 38 of file DecompressString.cpp.

bool save ( FILE *  f)

save preprocessor init-data to file

Definition at line 46 of file DecompressString.cpp.

Member Data Documentation

CCompressor* compressor
protected

compressor used to decompress strings

Definition at line 76 of file DecompressString.h.


The documentation for this class was generated from the following files:

SHOGUN Machine Learning Toolbox - Documentation