SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RealDistance.h
Go to the documentation of this file.
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 
14 #include <shogun/lib/config.h>
15 
17 #include <shogun/lib/common.h>
18 
19 namespace shogun
20 {
22 class CRealDistance : public CDenseDistance<float64_t>
23 {
24 public:
27 
34  virtual bool init(CFeatures* l, CFeatures* r)
35  {
37 
40 
41  return true;
42  }
43 
48  virtual EFeatureType get_feature_type() { return F_DREAL; }
49 
55  virtual const char* get_name() const { return "RealDistance"; }
56 
61  virtual void cleanup()=0;
62 
69  virtual EDistanceType get_distance_type()=0 ;
70 
71 protected:
75  virtual float64_t compute(int32_t x, int32_t y)=0;
76 };
77 } // namespace shogun
78 #endif

SHOGUN Machine Learning Toolbox - Documentation