aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/nullary.cpp
diff options
context:
space:
mode:
authorGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-07-22 14:04:00 +0200
committerGravatar Hauke Heibel <hauke.heibel@gmail.com>2010-07-22 14:04:00 +0200
commit734469e43f37839f179a9f12915889f3df89d477 (patch)
treea01e5fcb17a642eb04698fef24e505bc813540b3 /test/nullary.cpp
parent8e21cef80ac997b3d05c8c349b3676cb16d04cfe (diff)
Unified LinSpaced in order to be conform with other setter methods as e.g. Constant.
Diffstat (limited to 'test/nullary.cpp')
-rw-r--r--test/nullary.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/nullary.cpp b/test/nullary.cpp
index c54999580..78d2e9117 100644
--- a/test/nullary.cpp
+++ b/test/nullary.cpp
@@ -59,7 +59,7 @@ void testVectorType(const VectorType& base)
// check whether the result yields what we expect it to do
VectorType m(base);
- m.setLinSpaced(low,high,size);
+ m.setLinSpaced(size,low,high);
VectorType n(size);
for (int i=0; i<size; ++i)
@@ -68,7 +68,7 @@ void testVectorType(const VectorType& base)
VERIFY( (m-n).norm() < std::numeric_limits<Scalar>::epsilon()*10e3 );
// random access version
- m = VectorType::LinSpaced(low,high,size);
+ m = VectorType::LinSpaced(size,low,high);
VERIFY( (m-n).norm() < std::numeric_limits<Scalar>::epsilon()*10e3 );
// These guys sometimes fail! This is not good. Any ideas how to fix them!?
@@ -76,7 +76,7 @@ void testVectorType(const VectorType& base)
//VERIFY( m(0) == low );
// sequential access version
- m = VectorType::LinSpaced(Sequential,low,high,size);
+ m = VectorType::LinSpaced(Sequential,size,low,high);
VERIFY( (m-n).norm() < std::numeric_limits<Scalar>::epsilon()*10e3 );
// These guys sometimes fail! This is not good. Any ideas how to fix them!?
@@ -86,12 +86,12 @@ void testVectorType(const VectorType& base)
// check whether everything works with row and col major vectors
Matrix<Scalar,Dynamic,1> row_vector(size);
Matrix<Scalar,1,Dynamic> col_vector(size);
- row_vector.setLinSpaced(low,high,size);
- col_vector.setLinSpaced(low,high,size);
+ row_vector.setLinSpaced(size,low,high);
+ col_vector.setLinSpaced(size,low,high);
VERIFY( row_vector.isApprox(col_vector.transpose(), NumTraits<Scalar>::epsilon()));
Matrix<Scalar,Dynamic,1> size_changer(size+50);
- size_changer.setLinSpaced(low,high,size);
+ size_changer.setLinSpaced(size,low,high);
VERIFY( size_changer.size() == size );
}