SHOGUN
v3.2.0
|
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 UWEDGE_H_ 00013 #define UWEDGE_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 CUWedge : public CApproxJointDiagonalizer 00035 { 00036 public: 00037 00039 CUWedge() 00040 { 00041 } 00042 00044 virtual ~CUWedge() 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=1e-12, 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=1e-12, 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 "UWedge"; } 00078 }; 00079 } 00080 #endif //HAVE_EIGEN3 00081 #endif //UWEDGE_H_