SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
JediDiag.h
Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2013 Kevin Hughes
00008  *
00009  * Thanks to Andreas Ziehe and Cedric Gouy-Pailler
00010  */
00011 
00012 #ifndef JEDIDIAG_H_
00013 #define JEDIDIAG_H_
00014 
00015 #include <shogun/lib/config.h>
00016 
00017 #ifdef HAVE_EIGEN3
00018 
00019 #include <shogun/mathematics/ajd/ApproxJointDiagonalizer.h>
00020 #include <shogun/mathematics/Math.h>
00021 
00022 namespace shogun
00023 {
00024 
00034 class CJediDiag : public CApproxJointDiagonalizer
00035 {
00036     public:
00037 
00039         CJediDiag()
00040         {
00041         }
00042 
00044         virtual ~CJediDiag()
00045         {
00046         }
00047 
00055         static SGMatrix<float64_t> diagonalize(SGNDArray<float64_t> C,
00056                             SGMatrix<float64_t> V0 = SGMatrix<float64_t>(NULL,0,0,false),
00057                                 double eps=CMath::MACHINE_EPSILON,
00058                                 int itermax=200);
00059 
00067         virtual SGMatrix<float64_t> compute(SGNDArray<float64_t> C,
00068                            SGMatrix<float64_t> V0 = SGMatrix<float64_t>(NULL,0,0,false),
00069                            double eps=CMath::MACHINE_EPSILON,
00070                            int itermax=200)
00071         {
00072             m_V = diagonalize(C,V0,eps,itermax);
00073             return m_V;
00074         }
00075 
00077         virtual const char* get_name() const { return "JediDiag"; }
00078 };
00079 }
00080 #endif //HAVE_EIGEN3
00081 #endif //JEDIDIAG_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation