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

Detailed Description

template<class ST>
class shogun::CSimpleDistance< ST >

template class SimpleDistance

Definition at line 21 of file SimpleDistance.h.

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

Public Member Functions

 CSimpleDistance ()
virtual bool init (CFeatures *l, CFeatures *r)
virtual EFeatureClass get_feature_class ()
virtual EFeatureType get_feature_type ()
virtual const char * get_name () const
virtual void cleanup ()=0
virtual EDistanceType get_distance_type ()=0
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 CDistance
 CDistance ()
 CDistance (CFeatures *lhs, CFeatures *rhs)
virtual ~CDistance ()
float64_t distance (int32_t idx_a, int32_t idx_b)
SGMatrix< float64_tget_distance_matrix ()
virtual float64_tget_distance_matrix_real (int32_t &m, int32_t &n, float64_t *target)
virtual float32_tget_distance_matrix_shortreal (int32_t &m, int32_t &n, float32_t *target)
void load (CFile *loader)
void save (CFile *writer)
CFeaturesget_lhs ()
CFeaturesget_rhs ()
CFeaturesreplace_rhs (CFeatures *rhs)
virtual void remove_lhs_and_rhs ()
virtual void remove_lhs ()
 takes all necessary steps if the lhs is removed from distance matrix
virtual void remove_rhs ()
 takes all necessary steps if the rhs is removed from distance matrix
bool get_precompute_matrix ()
virtual void set_precompute_matrix (bool flag)
int32_t get_num_vec_lhs ()
int32_t get_num_vec_rhs ()
bool has_features ()
bool lhs_equals_rhs ()
- 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)

Additional Inherited Members

- Public Attributes inherited from CSGObject
SGIOio
Parallelparallel
Versionversion
Parameterm_parameters
Parameterm_model_selection_parameters
- Protected Member Functions inherited from CDistance
virtual float64_t compute (int32_t x, int32_t y)=0
void do_precompute_matrix ()
 matrix precomputation
- Static Protected Member Functions inherited from CDistance
static void * run_distance_thread (void *p)
 run distance thread
- Protected Attributes inherited from CDistance
float32_tprecomputed_matrix
bool precompute_matrix
CFeatureslhs
 feature vectors to occur on left hand side
CFeaturesrhs
 feature vectors to occur on right hand side

Constructor & Destructor Documentation

default constructor

Definition at line 25 of file SimpleDistance.h.

Member Function Documentation

virtual void cleanup ( )
pure virtual
virtual EDistanceType get_distance_type ( )
pure virtual
virtual EFeatureClass get_feature_class ( )
virtual

get feature class the distance can deal with

Returns
feature class SIMPLE

Implements CDistance.

Definition at line 56 of file SimpleDistance.h.

virtual EFeatureType get_feature_type ( )
virtual

get feature type the distance can deal with

Returns
template-specific feature type

Implements CDistance.

Reimplemented in CEuclidianDistance, CAttenuatedEuclidianDistance, and CRealDistance.

EFeatureType get_feature_type ( )
virtual

get feature type the DREAL distance can deal with

Returns
feature type DREAL

Implements CDistance.

Definition at line 91 of file SimpleDistance.h.

EFeatureType get_feature_type ( )
virtual

get feature type the ULONG distance can deal with

Returns
feature type ULONG

Implements CDistance.

Definition at line 97 of file SimpleDistance.h.

EFeatureType get_feature_type ( )
virtual

get feature type the INT distance can deal with

Returns
feature type INT

Implements CDistance.

Definition at line 103 of file SimpleDistance.h.

EFeatureType get_feature_type ( )
virtual

get feature type the WORD distance can deal with

Returns
feature type WORD

Implements CDistance.

Definition at line 109 of file SimpleDistance.h.

EFeatureType get_feature_type ( )
virtual

get feature type the SHORT distance can deal with

Returns
feature type SHORT

Implements CDistance.

Definition at line 115 of file SimpleDistance.h.

EFeatureType get_feature_type ( )
virtual

get feature type the BYTE distance can deal with

Returns
feature type BYTE

Implements CDistance.

Definition at line 121 of file SimpleDistance.h.

EFeatureType get_feature_type ( )
virtual

get feature type the CHAR distance can deal with

Returns
feature type CHAR

Implements CDistance.

Definition at line 127 of file SimpleDistance.h.

virtual const char* get_name ( ) const
virtual

Returns the name of the SGSerializable instance. It MUST BE the CLASS NAME without the prefixed `C'.

Returns
name of the SGSerializable

Implements CSGObject.

Reimplemented in CEuclidianDistance, CMinkowskiMetric, CAttenuatedEuclidianDistance, CCosineDistance, CManhattanMetric, CCanberraMetric, CGeodesicMetric, CJensenMetric, CTanimotoDistance, CChiSquareDistance, CBrayCurtisDistance, CChebyshewMetric, and CRealDistance.

Definition at line 69 of file SimpleDistance.h.

virtual bool init ( CFeatures l,
CFeatures r 
)
virtual

init distance

Parameters
lfeatures of left-hand side
rfeatures of right-hand side
Returns
if init was successful

Reimplemented from CDistance.

Reimplemented in CMinkowskiMetric, CEuclidianDistance, CAttenuatedEuclidianDistance, CCosineDistance, CManhattanMetric, CCanberraMetric, CGeodesicMetric, CJensenMetric, CTanimotoDistance, CChiSquareDistance, CBrayCurtisDistance, CChebyshewMetric, and CRealDistance.

Definition at line 33 of file SimpleDistance.h.


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

SHOGUN Machine Learning Toolbox - Documentation