gtsam
3rdparty
Eigen
test
type_alias.cpp
Go to the documentation of this file.
1
// This file is part of Eigen, a lightweight C++ template library
2
// for linear algebra.
3
//
4
// Copyright (C) 2019 Gael Guennebaud <gael.guennebaud@inria.fr>
5
//
6
// This Source Code Form is subject to the terms of the Mozilla
7
// Public License v. 2.0. If a copy of the MPL was not distributed
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10
#include "
main.h
"
11
12
EIGEN_DECLARE_TEST
(type_alias)
13
{
14
using namespace
internal
;
15
16
// To warm up, some basic checks:
17
STATIC_CHECK
((is_same<MatrixXd,
Matrix<double,Dynamic,Dynamic>
>::
value
));
18
STATIC_CHECK
((is_same<Matrix2f,
Matrix<float,2,2>
>::
value
));
19
STATIC_CHECK
((is_same<Array33i,
Array<int,3,3>
>::
value
));
20
21
#if EIGEN_HAS_CXX11
22
23
STATIC_CHECK
((is_same<MatrixX<double>, MatrixXd>::
value
));
24
STATIC_CHECK
((is_same<MatrixX<int>, MatrixXi>::
value
));
25
STATIC_CHECK
((is_same<Matrix2<int>, Matrix2i>::
value
));
26
STATIC_CHECK
((is_same<Matrix2X<float>, Matrix2Xf>::
value
));
27
STATIC_CHECK
((is_same<MatrixX4<double>, MatrixX4d>::
value
));
28
STATIC_CHECK
((is_same<
VectorX<int>
, VectorXi>::
value
));
29
STATIC_CHECK
((is_same<
Vector2<float>
, Vector2f>::
value
));
30
STATIC_CHECK
((is_same<RowVectorX<int>, RowVectorXi>::
value
));
31
STATIC_CHECK
((is_same<RowVector2<float>, RowVector2f>::
value
));
32
33
STATIC_CHECK
((is_same<ArrayXX<float>, ArrayXXf>::
value
));
34
STATIC_CHECK
((is_same<Array33<int>, Array33i>::
value
));
35
STATIC_CHECK
((is_same<Array2X<float>, Array2Xf>::
value
));
36
STATIC_CHECK
((is_same<ArrayX4<double>, ArrayX4d>::
value
));
37
STATIC_CHECK
((is_same<ArrayX<double>, ArrayXd>::
value
));
38
STATIC_CHECK
((is_same<Array4<double>, Array4d>::
value
));
39
40
STATIC_CHECK
((is_same<Vector<float,3>, Vector3f>::
value
));
41
STATIC_CHECK
((is_same<Vector<int,Dynamic>, VectorXi>::
value
));
42
STATIC_CHECK
((is_same<RowVector<float,3>, RowVector3f>::
value
));
43
STATIC_CHECK
((is_same<RowVector<int,Dynamic>, RowVectorXi>::
value
));
44
45
#else
46
std::cerr <<
"WARNING: c++11 type aliases not tested.\n"
;
47
#endif
48
}
EIGEN_DECLARE_TEST
EIGEN_DECLARE_TEST(type_alias)
Definition:
type_alias.cpp:12
Eigen::Array
General-purpose arrays with easy API for coefficient-wise operations.
Definition:
Array.h:45
Vector2
Definition:
test_operator_overloading.cpp:18
main.h
VectorX
Matrix< Scalar, Dynamic, 1 > VectorX
Definition:
sparse_lu.cpp:41
Eigen::Matrix< double, Dynamic, Dynamic >
internal
Definition:
BandTriangularSolver.h:13
test_callbacks.value
value
Definition:
test_callbacks.py:160
STATIC_CHECK
#define STATIC_CHECK(COND)
Definition:
main.h:397
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:37