SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
FFDiag.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 FFDIAG_H_
00013 #define FFDIAG_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 
00035 class CFFDiag : public CApproxJointDiagonalizer
00036 {
00037     public:
00038 
00040         CFFDiag()
00041         {
00042         }
00043 
00045         virtual ~CFFDiag()
00046         {
00047         }
00048 
00056         static SGMatrix<float64_t> diagonalize(SGNDArray<float64_t> C,
00057                             SGMatrix<float64_t> V0 = SGMatrix<float64_t>(NULL,0,0,false),
00058                             double eps=CMath::MACHINE_EPSILON,
00059                             int itermax=200);
00060 
00068         virtual SGMatrix<float64_t> compute(SGNDArray<float64_t> C,
00069                            SGMatrix<float64_t> V0 = SGMatrix<float64_t>(NULL,0,0,false),
00070                            double eps=CMath::MACHINE_EPSILON,
00071                            int itermax=200)
00072         {
00073             m_V = diagonalize(C,V0,eps,itermax);
00074             return m_V;
00075         }
00076 
00078         virtual const char* get_name() const { return "FFDiag"; }
00079 };
00080 }
00081 #endif //HAVE_EIGEN3
00082 #endif //FFDIAG_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation