aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/array_replicate.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-10-13 09:23:09 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-10-13 09:23:09 +0200
commit14430940729b043ae14576d388555fc048619a3c (patch)
treee60efc573d4b25d509c3a0c6f951d088d3c4a802 /test/array_replicate.cpp
parent2049f742e4a1a6ff8b7f1617a296a80b2ebb0281 (diff)
compilation fix: make the generic template ctor explicit
Diffstat (limited to 'test/array_replicate.cpp')
-rw-r--r--test/array_replicate.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/array_replicate.cpp b/test/array_replicate.cpp
index d1608915f..cd0f65f26 100644
--- a/test/array_replicate.cpp
+++ b/test/array_replicate.cpp
@@ -42,9 +42,9 @@ template<typename MatrixType> void replicate(const MatrixType& m)
MatrixType m1 = MatrixType::Random(rows, cols),
m2 = MatrixType::Random(rows, cols);
-
+
VectorType v1 = VectorType::Random(rows);
-
+
MatrixX x1, x2;
VectorX vx1;
@@ -56,17 +56,17 @@ template<typename MatrixType> void replicate(const MatrixType& m)
for(int i=0; i<f1; i++)
x1.block(i*rows,j*cols,rows,cols) = m1;
VERIFY_IS_APPROX(x1, m1.replicate(f1,f2));
-
+
x2.resize(2*rows,3*cols);
x2 << m2, m2, m2,
m2, m2, m2;
VERIFY_IS_APPROX(x2, (m2.template replicate<2,3>()));
-
+
x2.resize(rows,f1);
for (int j=0; j<f1; ++j)
x2.col(j) = v1;
VERIFY_IS_APPROX(x2, v1.rowwise().replicate(f1));
-
+
vx1.resize(rows*f2);
for (int j=0; j<f2; ++j)
vx1.segment(j*rows,rows) = v1;