SHOGUN  v3.2.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
RealDistance.h
浏览该文件的文档.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 1999-2009 Soeren Sonnenburg
8  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef _REALDISTANCE_H__
12 #define _REALDISTANCE_H__
13 
15 #include <shogun/lib/common.h>
16 
17 namespace shogun
18 {
20 class CRealDistance : public CDenseDistance<float64_t>
21 {
22 public:
25 
32  virtual bool init(CFeatures* l, CFeatures* r)
33  {
35 
38 
39  return true;
40  }
41 
46  virtual EFeatureType get_feature_type() { return F_DREAL; }
47 
53  virtual const char* get_name() const { return "RealDistance"; }
54 
59  virtual void cleanup()=0;
60 
67  virtual EDistanceType get_distance_type()=0 ;
68 
69 protected:
73  virtual float64_t compute(int32_t x, int32_t y)=0;
74 };
75 } // namespace shogun
76 #endif
virtual float64_t compute(int32_t x, int32_t y)=0
class RealDistance
Definition: RealDistance.h:20
virtual void cleanup()=0
virtual EFeatureType get_feature_type()
Definition: RealDistance.h:46
virtual bool init(CFeatures *l, CFeatures *r)
Definition: RealDistance.h:32
#define ASSERT(x)
Definition: SGIO.h:203
EDistanceType
Definition: Distance.h:31
double float64_t
Definition: common.h:48
EFeatureType
shogun feature type
Definition: FeatureTypes.h:16
virtual const char * get_name() const
Definition: RealDistance.h:53
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:16
The class Features is the base class of all feature objects.
Definition: Features.h:62
template class DenseDistance
Definition: DenseDistance.h:22
virtual EFeatureType get_feature_type() const =0
virtual EDistanceType get_distance_type()=0

SHOGUN Machine Learning Toolbox - Documentation