SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
mathematics
ajd
QDiag.h
浏览该文件的文档.
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 Kevin Hughes
8
*
9
* Thanks to Andreas Ziehe and Cedric Gouy-Pailler
10
*/
11
12
#ifndef QDIAG_H_
13
#define QDIAG_H_
14
15
#include <
shogun/lib/config.h
>
16
17
#ifdef HAVE_EIGEN3
18
19
#include <
shogun/mathematics/ajd/ApproxJointDiagonalizer.h
>
20
#include <
shogun/mathematics/Math.h
>
21
22
namespace
shogun
23
{
24
34
class
CQDiag
:
public
CApproxJointDiagonalizer
35
{
36
public
:
37
39
CQDiag
()
40
{
41
}
42
44
virtual
~CQDiag
()
45
{
46
}
47
55
static
SGMatrix<float64_t>
diagonalize
(
SGNDArray<float64_t>
C,
56
SGMatrix<float64_t>
V0 =
SGMatrix<float64_t>
(NULL,0,0,
false
),
57
double
eps=
CMath::MACHINE_EPSILON
,
58
int
itermax=200);
59
67
virtual
SGMatrix<float64_t>
compute
(
SGNDArray<float64_t>
C,
68
SGMatrix<float64_t>
V0 =
SGMatrix<float64_t>
(NULL,0,0,
false
),
69
double
eps=
CMath::MACHINE_EPSILON
,
70
int
itermax=200)
71
{
72
m_V
=
diagonalize
(C,V0,eps,itermax);
73
return
m_V
;
74
}
75
77
virtual
const
char
*
get_name
()
const
{
return
"QDiag"
; }
78
};
79
}
80
#endif //HAVE_EIGEN3
81
#endif //QDIAG_H_
SHOGUN
机器学习工具包 - 项目文档