11 using namespace Eigen;
19 double eps,
int itermax)
37 for (
int p = 0; p < m; p++)
39 for (
int q = p+1; q < m; q++)
45 if (fabs(theta) > eps)
78 for (k=0, cm=A; k<K; k++, cm+=M2)
80 diff_on = cm[pp] - cm[qq];
81 sum_off = cm[pq] + cm[qp];
83 G11 += diff_on * diff_on;
84 G22 += sum_off * sum_off;
85 G12 += diff_on * sum_off;
91 return -0.5 *
CMath::atan2 (toff, ton+sqrt(ton*ton+toff*toff));
105 for (k=0, kMN=0; k<K; k++, kMN+=MN)
107 for (cpt=0, ix=p+kMN, iy=q+kMN; cpt<N; cpt++, ix+=M, iy+=M)
121 int k, ix, iy, cpt, kMN;
126 for (k=0, kMN=0; k<K; k++, kMN+=M*N)
128 for (cpt=0, ix=pM+kMN, iy=qM+kMN; cpt<M; cpt++)
132 A[ix++] = c*nx - s*ny;
133 A[iy++] = s*nx + c*ny;
147 for (
int j = 0; j < n; j++, ix+=m, iy+=m)
static SGMatrix< float64_t > diagonalize(SGNDArray< float64_t > C, SGMatrix< float64_t > V0=SGMatrix< float64_t >(NULL, 0, 0, false), double eps=CMath::MACHINE_EPSILON, int itermax=200)
static float64_t atan2(float64_t y, float64_t x)
atan(x), x being a complex128_t not implemented
void left_rot_stack(float64_t *A, int M, int N, int K, int p, int q, float64_t c, float64_t s)
float64_t givens_stack(float64_t *A, int M, int K, int p, int q)
all of classes and functions are contained in the shogun namespace
void right_rot_stack(float64_t *A, int M, int N, int K, int p, int q, float64_t c, float64_t s)
void left_rot_simple(float64_t *A, int m, int n, int p, int q, float64_t c, float64_t s)
static SGMatrix< T > create_identity_matrix(index_t size, T scale)