Go to the documentation of this file.
15 for (
int i=0;
i<k;
i++)
33 for (
int i=0;
i<=20;
i++)
35 angle =
static_cast<T>(
pow(10,
i / 5. - 2));
38 C = (angle*
A).matrixFunction(
expfn);
39 std::cout <<
"test2dRotation: i = " <<
i <<
" error funm = " <<
relerr(
C,
B);
43 std::cout <<
" error expm = " <<
relerr(
C,
B) <<
"\n";
52 std::complex<T> imagUnit(0,1);
55 for (
int i=0;
i<=20;
i++)
57 angle =
static_cast<T>((
i-10) / 2.0);
60 A << 0, angle*imagUnit, -angle*imagUnit, 0;
61 B << ch, sh*imagUnit, -sh*imagUnit, ch;
64 std::cout <<
"test2dHyperbolicRotation: i = " <<
i <<
" error funm = " <<
relerr(
C,
B);
68 std::cout <<
" error expm = " <<
relerr(
C,
B) <<
"\n";
81 A(
i+1,
i) =
static_cast<T>(
i+1);
84 for (
int j=0;
j<=
i;
j++)
88 std::cout <<
"testPascal: size = " <<
size <<
" error funm = " <<
relerr(
C,
B);
92 std::cout <<
" error expm = " <<
relerr(
C,
B) <<
"\n";
97 template<
typename MatrixType>
113 std::cout <<
"randomTest: error funm = " <<
relerr(identity,
m2);
117 std::cout <<
" error expm = " <<
relerr(identity,
m2) <<
"\n";
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Jet< T, N > sin(const Jet< T, N > &f)
void randomTest(const MatrixType &m, double tol)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
const EIGEN_DEVICE_FUNC ExpReturnType exp() const
#define CALL_SUBTEST_9(FUNC)
Jet< T, N > cos(const Jet< T, N > &f)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
const EIGEN_DEVICE_FUNC CoshReturnType cosh() const
#define CALL_SUBTEST_4(FUNC)
#define CALL_SUBTEST_3(FUNC)
EIGEN_DECLARE_TEST(matrix_exponential)
#define CALL_SUBTEST_1(FUNC)
Derived::RealScalar relerr(const MatrixBase< Derived > &A, const MatrixBase< OtherDerived > &B)
double binom(int n, int k)
#define CALL_SUBTEST_5(FUNC)
void test2dRotation(double tol)
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_2(FUNC)
NumTraits< Scalar >::Real RealScalar
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_pow_op< typename Derived::Scalar, typename ExponentDerived::Scalar >, const Derived, const ExponentDerived > pow(const Eigen::ArrayBase< Derived > &x, const Eigen::ArrayBase< ExponentDerived > &exponents)
Matrix< Scalar, Dynamic, Dynamic > C
mp::number< mp::cpp_dec_float< 100 >, mp::et_on > Real
void testPascal(double tol)
The matrix class, also used for vectors and row-vectors.
const EIGEN_DEVICE_FUNC SinhReturnType sinh() const
#define CALL_SUBTEST_7(FUNC)
#define CALL_SUBTEST_8(FUNC)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
void test2dHyperbolicRotation(double tol)
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:02