14 template<
typename MatrixType,
typename JacobiScalar>
21 RowsAtCompileTime = MatrixType::RowsAtCompileTime,
22 ColsAtCompileTime = MatrixType::ColsAtCompileTime
29 JacobiVector
v = JacobiVector::Random().normalized();
30 JacobiScalar
c = v.x(),
s = v.y();
34 Index p = internal::random<Index>(0, rows-1);
37 q = internal::random<Index>(0, rows-1);
41 b.applyOnTheLeft(p, q, rot);
47 Index p = internal::random<Index>(0, cols-1);
50 q = internal::random<Index>(0, cols-1);
54 b.applyOnTheRight(p, q, rot);
63 CALL_SUBTEST_1(( jacobi<Matrix3f, float>() ));
64 CALL_SUBTEST_2(( jacobi<Matrix4d, double>() ));
65 CALL_SUBTEST_3(( jacobi<Matrix4cf, float>() ));
66 CALL_SUBTEST_3((
jacobi<Matrix4cf, std::complex<float> >() ));
70 CALL_SUBTEST_4(( jacobi<MatrixXf, float>(MatrixXf(r,
c)) ));
71 CALL_SUBTEST_5(( jacobi<MatrixXcd, double>(MatrixXcd(r,
c)) ));
72 CALL_SUBTEST_5((
jacobi<MatrixXcd, std::complex<double> >(MatrixXcd(r,
c)) ));
74 CALL_SUBTEST_6(( jacobi<MatrixXcf, float>(MatrixXcf(r,
c)) ));
75 CALL_SUBTEST_6((
jacobi<MatrixXcf, std::complex<float> >(MatrixXcf(r,
c)) ));
int EIGEN_BLAS_FUNC() rot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy, RealScalar *pc, RealScalar *ps)
Rotation given by a cosine-sine pair.
#define VERIFY_IS_APPROX(a, b)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
void jacobi(const MatrixType &m=MatrixType())
EIGEN_DEVICE_FUNC const Scalar & q
#define TEST_SET_BUT_UNUSED_VARIABLE(X)
#define EIGEN_TEST_MAX_SIZE
The matrix class, also used for vectors and row-vectors.
ScalarWithExceptions conj(const ScalarWithExceptions &x)