SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SparseEuclideanDistance.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) 2007-2009 Soeren Sonnenburg
8  * Copyright (C) 2007-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef _SPARSEEUCLIDEANDISTANCE_H__
12 #define _SPARSEEUCLIDEANDISTANCE_H__
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
19 
20 namespace shogun
21 {
22  template <class T> class CSparseFeatures;
24 class CSparseEuclideanDistance: public CSparseDistance<float64_t>
25 {
26  public:
29 
37  virtual ~CSparseEuclideanDistance();
38 
45  virtual bool init(CFeatures* l, CFeatures* r);
46 
48  virtual void cleanup();
49 
55 
60  virtual EFeatureType get_feature_type() { return F_DREAL; }
61 
66  virtual const char* get_name() const { return "SparseEuclideanDistance"; }
67 
68  protected:
72  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
73  /* compute_kernel*/
74 
75  private:
76  void init();
77 
78  protected:
83 
84 };
85 
86 } // namespace shogun
87 #endif /* _SPARSEEUCLIDEANDISTANCE_H__ */
virtual EDistanceType get_distance_type()
class SparseEucldeanDistance
template class SparseDistance
virtual const char * get_name() const
virtual bool init(CFeatures *l, CFeatures *r)
EDistanceType
Definition: Distance.h:32
virtual float64_t compute(int32_t idx_a, int32_t idx_b)
double float64_t
Definition: common.h:50
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

SHOGUN Machine Learning Toolbox - Documentation