10 #define EIGEN_NO_STATIC_ASSERT
29 mzero = MatrixType::Zero(
rows,
cols),
32 vzero = VectorType::Zero(
rows);
36 while(
x ==
Scalar(0))
x = internal::random<Scalar>();
38 Index r = internal::random<Index>(0,
rows-1),
39 c = internal::random<Index>(0,
cols-1);
54 x =
v1(
static_cast<char>(
r1));
55 x =
v1(
static_cast<signed char>(
r1));
56 x =
v1(
static_cast<unsigned char>(
r1));
57 x =
v1(
static_cast<signed short>(
r1));
58 x =
v1(
static_cast<unsigned short>(
r1));
59 x =
v1(
static_cast<signed int>(
r1));
60 x =
v1(
static_cast<unsigned int>(
r1));
61 x =
v1(
static_cast<signed long>(
r1));
62 x =
v1(
static_cast<unsigned long>(
r1));
64 x =
v1(
static_cast<long long int>(
r1));
65 x =
v1(
static_cast<unsigned long long int>(
r1));
112 m3.real() =
m1.real();
128 sm2.col(
i) = sm1.row(
i);
133 sm2.col(
i).noalias() = sm1.row(
i);
138 sm2.col(
i).noalias() += sm1.row(
i);
143 sm2.col(
i).noalias() -= sm1.row(
i);
148 bool b = internal::random<int>(0,10)>5;
170 Scalar s1 = internal::random<Scalar>(),
171 s2 = internal::random<Scalar>();
180 RealMatrixType rm1 = RealMatrixType::Random(
rows,
cols),
181 rm2 = RealMatrixType::Random(
rows,
cols);
198 template<
typename SrcScalar,
typename TgtScalar>
202 for (
int i=0;
i<
m.rows(); ++
i) {
203 for (
int j=0;
j<
m.cols(); ++
j) {
208 for (
int i=0;
i<
m.rows(); ++
i) {
209 for (
int j=0;
j<
m.cols(); ++
j) {
216 template<
typename SrcScalar,
typename EnableIf =
void>
239 template<
typename SrcScalar>
271 template <
typename Scalar>
275 for(
int k=0; k<4; ++k)
276 raw[k] = internal::random<Scalar>();
281 for(
int k=0; k<4; ++k)
VERIFY(
m(k) == raw[k]);
282 for(
int k=0; k<4; ++k)
VERIFY(
a(k) == raw[k]);
289 for(
int k=0; k<3; ++k)
VERIFY(
m(k) == raw[k]);
290 for(
int k=0; k<3; ++k)
VERIFY(
a(k) == raw[k]);
297 for(
int k=0; k<2; ++k)
VERIFY(
m(k) == raw[k]);
298 for(
int k=0; k<2; ++k)
VERIFY(
a(k) == raw[k]);
307 m3( (
int(raw[0])), (
int(raw[1])) ),
308 m4( (
float(raw[0])), (
float(raw[1])) );
310 for(
int k=0; k<2; ++k)
VERIFY(
m(k) == raw[k]);
311 for(
int k=0; k<2; ++k)
VERIFY(
a(k) == raw[k]);
316 for(
int k=0; k<2; ++k)
VERIFY(
m3(k) ==
int(raw[k]));
317 for(
int k=0; k<2; ++k)
VERIFY((m4(k)) ==
Scalar(
float(raw[k])));