Go to the documentation of this file.
11 #ifdef EIGEN_DEFAULT_TO_ROW_MAJOR
12 #undef EIGEN_DEFAULT_TO_ROW_MAJOR
15 #define TEST_ENABLE_TEMPORARY_TRACKING
16 #define TEST_CHECK_STATIC_ASSERTIONS
22 #if EIGEN_ARCH_i386 && !(EIGEN_ARCH_x86_64)
24 #if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_LEAST(4,4)
25 #pragma GCC optimize ("-ffloat-store")
27 #undef VERIFY_IS_EQUAL
28 #define VERIFY_IS_EQUAL(X,Y) VERIFY_IS_APPROX(X,Y)
52 Index brows = internal::random<Index>(1,
rows-
i);
53 Index bcols = internal::random<Index>(1,
cols-
j);
59 RefDynMat rm2 =
m1.block(
i,
j,brows,bcols);
62 m2.block(
i,
j,brows,bcols).setOnes();
65 m2.block(
i,
j,brows,bcols).setRandom();
66 rm2 =
m2.block(
i,
j,brows,bcols);
69 ConstRefDynMat rm3 =
m1.block(
i,
j,brows,bcols);
70 m1.block(
i,
j,brows,bcols) *= 2;
71 m2.block(
i,
j,brows,bcols) *= 2;
73 RefRealMatWithStride rm4 =
m1.real();
76 m2.real().array() += 1;
100 mat3 = MatrixType::Random(
size,
size);
103 Index bsize = internal::random<Index>(1,
size-
i);
110 if(VectorType::SizeAtCompileTime!=1)
113 RefDynMat rv2 =
v1.segment(
i,bsize);
116 v2.segment(
i,bsize).setOnes();
119 v2.segment(
i,bsize).setRandom();
120 rv2 =
v2.segment(
i,bsize);
123 ConstRefDynMat rm3 =
v1.segment(
i,bsize);
124 v1.segment(
i,bsize) *= 2;
125 v2.segment(
i,bsize) *= 2;
128 RefRealMatWithStride rm4 =
v1.real();
131 v2.real().array() += 1;
134 RefMatWithStride rm5 =
mat1.row(
i).transpose();
137 mat2.row(
i).array() += 1;
139 rm5.noalias() = rm4.transpose() * mat3;
140 mat2.row(
i) =
v2.real().transpose() * mat3;
144 template<
typename Scalar,
int Rows,
int Cols>
155 RowMajorMatrixType mr = RowMajorMatrixType::Random();
156 ColMajorMatrixType mc = ColMajorMatrixType::Random();
158 Index i = internal::random<Index>(0,Rows-1);
234 VectorXcf ca = VectorXcf::Random(10);
235 VectorXf
a = VectorXf::Random(10);
236 RowVectorXf
b = RowVectorXf::Random(10);
237 MatrixXf
A = MatrixXf::Random(10,10);
238 RowVector3f
c = RowVector3f::Random();
239 const VectorXf& ac(
a);
256 MatrixXf tmp =
A*
A.col(1);
325 Vector4f v4 = Vector4f::Random();
326 VectorXf
vx = VectorXf::Random(10);
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Holds strides information for Map.
MatrixXd mat1(size, size)
#define VERIFY_IS_EQUAL(a, b)
Convenience specialization of Stride to specify only an inner stride See class Map for some examples.
#define VERIFY_RAISES_ASSERT(a)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
void ref_vector_fixed_sizes()
#define CALL_SUBTEST_4(FUNC)
int test_ref_overload_fun1(Ref< MatrixXd >)
void test_ref_fixed_size_assert()
void check_const_correctness(const PlainObjectType &)
EIGEN_DONT_INLINE void call_ref_6(const Ref< const MatrixXf, 0, OuterStride<> > &a, const B &b)
#define CALL_SUBTEST_3(FUNC)
#define CALL_SUBTEST_1(FUNC)
#define EIGEN_UNUSED_VARIABLE(var)
void test_ref_overloads()
const unsigned int LvalueBit
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
#define CALL_SUBTEST_5(FUNC)
EIGEN_DONT_INLINE void call_ref_7(Ref< Matrix< float, Dynamic, 3 > > a, const B &b)
void ref_matrix(const MatrixType &m)
#define VERIFY_RAISES_STATIC_ASSERT(a)
#define CALL_SUBTEST_6(FUNC)
#define CALL_SUBTEST_2(FUNC)
Matrix< double, Dynamic, Dynamic, RowMajor > RowMatrixXd
#define VERIFY_IS_APPROX(a, b)
EIGEN_DONT_INLINE void call_ref_4(const Ref< const VectorXf, 0, InnerStride<> > &a, const B &b)
EIGEN_DONT_INLINE void call_ref_1(Ref< VectorXf > a, const B &b)
NumTraits< Scalar >::Real RealScalar
A matrix or vector expression mapping an existing expression.
EIGEN_DONT_INLINE void call_ref_2(const Ref< const VectorXf > &a, const B &b)
#define VERIFY_EVALUATION_COUNT(XPR, N)
Reference counting helper.
Expression of a fixed-size or dynamic-size sub-vector.
EIGEN_DONT_INLINE void call_ref_5(Ref< MatrixXf, 0, OuterStride<> > a, const B &b)
The matrix class, also used for vectors and row-vectors.
void test_ref_ambiguous(const Ref< const ArrayXd > &A, Ref< ArrayXd > B)
void ref_vector(const VectorType &m)
EIGEN_DONT_INLINE void call_ref_3(Ref< VectorXf, 0, InnerStride<> > a, const B &b)
#define CALL_SUBTEST_7(FUNC)
#define CALL_SUBTEST_8(FUNC)
StridedVectorType vx(make_vector(x, *n, std::abs(*incx)))
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
int test_ref_overload_fun2(Ref< const MatrixXd >)
#define EIGEN_DONT_INLINE
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:58