SHOGUN  v3.0.0
 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 
18 #include <shogun/lib/SGMatrix.h>
19 
20 namespace shogun
21 {
22 
31 {
32  public:
35 
43 
46 
48  virtual void cleanup();
49 
51  virtual const char* get_name() const;
52 
58 
59  protected:
69  virtual float64_t compute(int32_t idx_a, int32_t idx_b);
70 
71  private:
73  void init();
74 
75  private:
77  SGMatrix<float64_t> m_mahalanobis_matrix;
78 
79 }; /* class CCustomMahalanobisDistance */
80 
81 } /* namespace shogun */
82 
83 #endif /* HAVE_EIGEN3 */
84 
85 #endif /* CUSTOM_MAHALANOBIS_DISTANCE_ */

SHOGUN Machine Learning Toolbox - Documentation