25 TensorType rmat = generateRotationMatrix<TestType>(0.0, 0.0, 0.0);
28 for (
int i = 0; i < 3; i++)
29 for (
int j = 0; j < 3; j++)
31 CHECK(rmat(i, j) == Approx(1.0));
33 CHECK(rmat(i, j) == Approx(0.0));
36 TensorType rmat2 = generateRotationMatrix<TestType>(0.1, 0.2, 0.3);
38 CHECK(rmat2(0, 0) == Approx(-0.459016994374947));
39 CHECK(rmat2(0, 1) == Approx(0.842075137094350));
40 CHECK(rmat2(0, 2) == Approx(-0.283218753550188));
41 CHECK(rmat2(1, 0) == Approx(-0.489403985718866));
42 CHECK(rmat2(1, 1) == Approx(0.0263932022500210));
43 CHECK(rmat2(1, 2) == Approx(0.871657695220709));
44 CHECK(rmat2(2, 0) == Approx(0.741476323045772));
45 CHECK(rmat2(2, 1) == Approx(0.538714082201795));
46 CHECK(rmat2(2, 2) == Approx(0.400000000000000));
49 TensorType rmat3 = generateRotationMatrix<TestType>(0.9, 0.5, 0.8);
51 CHECK(rmat3(0, 0) == Approx(0.485410196624969));
52 CHECK(rmat3(0, 1) == Approx(-0.352671151375484));
53 CHECK(rmat3(0, 2) == Approx(0.800000000000000));
54 CHECK(rmat3(1, 0) == Approx(-0.587785252292473));
55 CHECK(rmat3(1, 1) == Approx(-0.809016994374947));
56 CHECK(rmat3(1, 2) == Approx(9.79717439317882
e-17));
57 CHECK(rmat3(2, 0) == Approx(0.647213595499958));
58 CHECK(rmat3(2, 1) == Approx(-0.470228201833979));
59 CHECK(rmat3(2, 2) == Approx(-0.600000000000000));
helper functions for EinsplineSetBuilder
Tensor<T,D> class for D by D tensor.
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
TEMPLATE_TEST_CASE("RandomRotationMatrix", "[numerics]", float, double)