26 m2 = MatrixType::Random(rows, cols);
28 VectorType
v1 = VectorType::Random(rows);
33 int f1 = internal::random<int>(1,10),
34 f2 = internal::random<int>(1,10);
36 x1.resize(rows*f1,cols*
f2);
37 for(
int j=0;
j<
f2;
j++)
38 for(
int i=0;
i<
f1;
i++)
39 x1.block(
i*rows,
j*cols,rows,cols) =
m1;
42 x2.resize(2*rows,3*cols);
47 x2.resize(rows,3*cols);
51 vx1.resize(3*rows,cols);
55 vx1=m2+(m2.colwise().replicate(1));
58 VERIFY_IS_APPROX(m2.coeff(0), (m2.template replicate<3,1>().coeff(m2.rows())));
61 for (
int j=0;
j<
f1; ++
j)
66 for (
int j=0;
j<
f2; ++
j)
67 vx1.segment(
j*rows,rows) =
v1;
78 CALL_SUBTEST_5(
replicate(VectorXf(16)) );
79 CALL_SUBTEST_6(
replicate(VectorXcd(10)) );
Matrix< Scalar, Dynamic, 1 > VectorX
Pose3 x2(Rot3::Ypr(0.0, 0.0, 0.0), l2)
double f2(const Vector2 &x)
#define VERIFY_IS_APPROX(a, b)
void replicate(const MatrixType &m)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
void test_array_replicate()
Point2 f1(const Point3 &p, OptionalJacobian< 2, 3 > H)
The matrix class, also used for vectors and row-vectors.