13 template<
typename T1,
typename T2>
17 return (a.array() == b.array()).
all();
20 template <
int Order,
typename MatType>
23 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1: 1>
v1( 1);
24 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1: 2>
v2( 2);
25 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1: 4> v4( 4);
26 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1: 8> v8( 8);
27 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1:16> v16(16);
52 template <
typename MatType>
55 template <
typename MatType>
66 template <
typename MatType>
71 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1: 1>
v1( 1);
72 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1: 2>
v2( 2);
73 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1: 4> v4( 4);
74 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1: 8> v8( 8);
75 internal::VariableAndFixedInt<MatType::SizeAtCompileTime==
Dynamic?-1:16> v16(16);
109 MapMat(m.data(), 4, 4)
135 check_auto_reshape4x4<ColMajor> (
m);
136 check_auto_reshape4x4<RowMajor> (
m);
137 check_auto_reshape4x4<AutoOrder>(
m);
138 check_auto_reshape4x4<ColMajor> (m.transpose());
139 check_auto_reshape4x4<ColMajor> (m.transpose());
140 check_auto_reshape4x4<AutoOrder>(m.transpose());
144 if((MatType::Flags&RowMajorBit)==0)
147 VERIFY_IS_EQUAL(m.template reshaped<ColMajor>(2,8),m.template reshaped<AutoOrder>(2,8));
148 VERIFY_IS_EQUAL(m.transpose().template reshaped<RowMajor>(2,8),m.transpose().template reshaped<AutoOrder>(2,8));
153 VERIFY_IS_EQUAL(m.template reshaped<RowMajor>(2,8),m.template reshaped<AutoOrder>(2,8));
154 VERIFY_IS_EQUAL(m.transpose().template reshaped<ColMajor>(2,8),m.transpose().template reshaped<AutoOrder>(2,8));
155 VERIFY_IS_EQUAL(m.transpose().reshaped(2,8),m.transpose().template reshaped<AutoOrder>(2,8));
158 MatrixXi m28r1 = m.template reshaped<RowMajor>(2,8);
159 MatrixXi m28r2 = m.transpose().template reshaped<ColMajor>(8,2).transpose();
164 VERIFY_IS_EQUAL(m.reshaped(1,16).eval(), m.reshaped().transpose().eval());
170 VERIFY_IS_EQUAL(m.transpose().reshaped(), m.template reshaped<RowMajor>());
192 m.reshaped(2,8).nestedExpression() =
m;
200 MatrixXi mx = MatrixXi::Random(4, 4);
201 Matrix4i m4 = Matrix4i::Random(4, 4);
202 RowMatrixXi rmx = RowMatrixXi::Random(4, 4);
203 RowMatrix4i rm4 = RowMatrix4i::Random(4, 4);
void reshape4x4(MatType m)
static const Eigen::internal::all_t all
void check_auto_reshape4x4(MatType m)
A matrix or vector expression mapping an existing array of data.
void check_direct_access_reshape4x4(MatType, internal::FixedInt< RowMajorBit >)
Reshape< OutM, OutN, OutOptions, InM, InN, InOptions >::ReshapedType reshape(const Eigen::Matrix< double, InM, InN, InOptions > &m)
static const Pose3 T2(Rot3::Rodrigues(0.3, 0.2, 0.1), P2)
const unsigned int RowMajorBit
static const symbolic::SymbolExpr< internal::symbolic_last_tag > last
#define VERIFY_IS_APPROX(a, b)
#define VERIFY_IS_EQUAL(a, b)
internal::enable_if<!(symbolic::is_symbolic< FirstType >::value||symbolic::is_symbolic< LastType >::value), ArithmeticSequence< typename internal::cleanup_index_type< FirstType >::type, Index > >::type seq(FirstType f, LastType l)
#define CALL_SUBTEST(FUNC)
EIGEN_DECLARE_TEST(reshape)
static const Similarity3 T1(R, Point3(3.5, -8.2, 4.2), 1)
internal::enable_if< internal::is_same< T1, T2 >::value, bool >::type is_same_eq(const T1 &a, const T2 &b)
Derived & setRandom(Index size)