25 ColVectorType cv1 = ColVectorType::Random(
rows);
26 RowVectorType rv1 = RowVectorType::Random(
cols);
28 Scalar s1 = internal::random<Scalar>(),
29 s2 = internal::random<Scalar>();
47 VERIFY_IS_APPROX(
m1.colwise().sum(),
m1.colwise().redux(internal::scalar_sum_op<Scalar,Scalar>()));
71 const Scalar& ref_m1 =
m.matrix().array().coeffRef(0);
72 const Scalar& ref_m2 =
m.matrix().array().coeffRef(0,0);
73 const Scalar& ref_a1 =
m.array().matrix().coeffRef(0);
74 const Scalar& ref_a2 =
m.array().matrix().coeffRef(0,0);
75 VERIFY(&ref_a1 == &ref_m1);
76 VERIFY(&ref_a2 == &ref_m2);
79 m1.array().coeffRef(0,0) = 1;
83 m1.array().matrix().coeffRef(0,0) = 3;
85 m1.array().matrix()(0,0) = 4;
98 Index r = internal::random<Index>(0,
rows-1),
99 c = internal::random<Index>(0,
cols-1);
125 Scalar mid = (
m1.cwiseAbs().minCoeff() +
m1.cwiseAbs().maxCoeff())/
Scalar(2);
146 VERIFY( ((
m1.array()<-
a).matrix() || (
m1.array()>
a).matrix()).count() == (
m1.cwiseAbs().array()>
a).count());
216 template<
typename MatrixTraits>
void resize(
const MatrixTraits&
t)
235 v.array().resize(
cols);
244 ArrayXf
a = RowVectorXf(3);