SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CustomMahalanobisDistance.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) 2013 Fernando J. Iglesias Garcia
8  * Copyright (C) 2013 Fernando J. Iglesias Garcia
9  */
10 
11 #ifndef CUSTOM_MAHALANOBIS_DISTANCE_
12 #define CUSTOM_MAHALANOBIS_DISTANCE_
13 
14 #ifdef HAVE_EIGEN3
15 
16 #include <shogun/lib/config.h>
17 
20 #include <shogun/lib/SGMatrix.h>
21 
22 namespace shogun
23 {
24 
33 {
34  public:
37 
45 
48 
50  virtual void cleanup();
51 
53  virtual const char* get_name() const;
54 
60 
61  protected:
71  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
72 
73  private:
75  void register_params();
76 
77  private:
79  SGMatrix<float64_t> m_mahalanobis_matrix;
80 
81 }; /* class CCustomMahalanobisDistance */
82 
83 } /* namespace shogun */
84 
85 #endif /* HAVE_EIGEN3 */
86 
87 #endif /* CUSTOM_MAHALANOBIS_DISTANCE_ */

SHOGUN Machine Learning Toolbox - Documentation