SHOGUN  4.1.0
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
EuclideanDistance.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) 2007-2009 Soeren Sonnenburg
8  * Copyright (C) 2007-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef _EUCLIDEANDISTANCE_H__
12 #define _EUCLIDEANDISTANCE_H__
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
19 
20 namespace shogun
21 {
46 {
47  public:
50 
57  virtual ~CEuclideanDistance();
58 
65  virtual bool init(CFeatures* l, CFeatures* r);
66 
68  virtual void cleanup();
69 
75 
80  virtual EFeatureType get_feature_type() { return F_DREAL; }
81 
86  virtual const char* get_name() const { return "EuclideanDistance"; }
87 
93  virtual bool get_disable_sqrt() { return disable_sqrt; };
94 
100  virtual void set_disable_sqrt(bool state) { disable_sqrt=state; };
101 
114  virtual float64_t distance_upper_bounded(int32_t idx_a, int32_t idx_b, float64_t upper_bound);
115 
116  protected:
120  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
121 
122  private:
123  void init();
124 
125  protected:
128 };
129 
130 } // namespace shogun
131 #endif /* _EUCLIDEANDISTANCE_H__ */
virtual const char * get_name() const
class RealDistance
Definition: RealDistance.h:22
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
virtual float64_t distance_upper_bounded(int32_t idx_a, int32_t idx_b, float64_t upper_bound)
EDistanceType
Definition: Distance.h:32
virtual void set_disable_sqrt(bool state)
virtual EDistanceType get_distance_type()
double float64_t
Definition: common.h:50
virtual bool init(CFeatures *l, CFeatures *r)
EFeatureType
shogun feature type
Definition: FeatureTypes.h:19
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class Features is the base class of all feature objects.
Definition: Features.h:68
virtual EFeatureType get_feature_type()
class EuclideanDistance

SHOGUN 机器学习工具包 - 项目文档