SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AttenuatedEuclideanDistance.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) 2011 Miguel Angel Bautista
8  * Copyright (C) 2011 Berlin Institute of Technology and Max Planck Society
9  */
10 
11 #ifndef _ATTENUATEDEuclideanDISTANCE_H__
12 #define _ATTENUATEDEuclideanDISTANCE_H__
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
19 
20 namespace shogun
21 {
41 {
42  public:
45 
53 
60  virtual bool init(CFeatures* l, CFeatures* r);
61 
63  virtual void cleanup();
64 
70 
75  virtual EFeatureType get_feature_type() { return F_DREAL; }
76 
81  virtual const char* get_name() const { return "AttenuatedEuclideanDistance"; }
82 
88  virtual bool get_disable_sqrt() { return disable_sqrt; };
89 
95  virtual void set_disable_sqrt(bool state) { disable_sqrt=state; };
96 
97  protected:
101  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
102 
103  private:
104  void init();
105 
106  protected:
109 };
110 
111 } // namespace shogun
112 #endif /* _ATTENUATEDEuclideanDISTANCE_H__ */

SHOGUN Machine Learning Toolbox - Documentation