diff options
author | 2008-03-03 11:02:52 +0000 | |
---|---|---|
committer | 2008-03-03 11:02:52 +0000 | |
commit | 46885d33bfd6cdcf3040923a4aef1b059684b854 (patch) | |
tree | 5187bd79214e7ac7dc2c0f5111910517add5f27f /test | |
parent | 255689231d4267d8a254fef5b59162d92c3cab4d (diff) |
Removed trailling spaces.
Diffstat (limited to 'test')
-rw-r--r-- | test/basicstuff.cpp | 16 | ||||
-rw-r--r-- | test/cwiseop.cpp | 7 | ||||
-rw-r--r-- | test/submatrices.cpp | 14 |
3 files changed, 19 insertions, 18 deletions
diff --git a/test/basicstuff.cpp b/test/basicstuff.cpp index 69b9e3a6d..ec00f2b90 100644 --- a/test/basicstuff.cpp +++ b/test/basicstuff.cpp @@ -5,12 +5,12 @@ // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either +// License as published by the Free Software Foundation; either // version 3 of the License, or (at your option) any later version. // // Alternatively, you can redistribute it and/or // modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of +// published by the Free Software Foundation; either version 2 of // the License, or (at your option) any later version. // // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY @@ -18,7 +18,7 @@ // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the // GNU General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public +// You should have received a copy of the GNU Lesser General Public // License and a copy of the GNU General Public License along with // Eigen. If not, see <http://www.gnu.org/licenses/>. @@ -30,10 +30,10 @@ template<typename MatrixType> void basicStuff(const MatrixType& m) { typedef typename MatrixType::Scalar Scalar; typedef Matrix<Scalar, MatrixType::Traits::RowsAtCompileTime, 1> VectorType; - + int rows = m.rows(); int cols = m.cols(); - + // this test relies a lot on Random.h, and there's not much more that we can do // to test it, hence I consider that we will have tested Random.h MatrixType m1 = MatrixType::random(rows, cols), @@ -50,7 +50,7 @@ template<typename MatrixType> void basicStuff(const MatrixType& m) int r = ei_random<int>(0, rows-1), c = ei_random<int>(0, cols-1); - + VERIFY_IS_APPROX( v1, v1); VERIFY_IS_NOT_APPROX( v1, 2*v1); VERIFY_IS_MUCH_SMALLER_THAN( vzero, v1); @@ -63,7 +63,7 @@ template<typename MatrixType> void basicStuff(const MatrixType& m) VERIFY_IS_MUCH_SMALLER_THAN( mzero, m1); VERIFY_IS_NOT_MUCH_SMALLER_THAN(m1, m1); VERIFY_IS_APPROX( mzero, m1-m1); - + // always test operator() on each read-only expression class, // in order to check const-qualifiers. // indeed, if an expression class (here Zero) is meant to be read-only, @@ -71,7 +71,7 @@ template<typename MatrixType> void basicStuff(const MatrixType& m) // should return a const-qualified object so that it is the const-qualified // operator() that gets called, which in turn calls _read(). VERIFY_IS_MUCH_SMALLER_THAN(MatrixType::zero(rows,cols)(r,c), static_cast<Scalar>(1)); - + // now test copying a row-vector into a (column-)vector and conversely. square.col(r) = square.row(r).eval(); Matrix<Scalar, 1, MatrixType::Traits::RowsAtCompileTime> rv(rows); diff --git a/test/cwiseop.cpp b/test/cwiseop.cpp index b8dac7884..7c4a9a364 100644 --- a/test/cwiseop.cpp +++ b/test/cwiseop.cpp @@ -1,16 +1,17 @@ // This file is part of Eigen, a lightweight C++ template library // for linear algebra. Eigen itself is part of the KDE project. // +// Copyright (C) 2008 Gael Guennebaud <g.gael@free.fr> // Copyright (C) 2006-2008 Benoit Jacob <jacob@math.jussieu.fr> // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either +// License as published by the Free Software Foundation; either // version 3 of the License, or (at your option) any later version. // // Alternatively, you can redistribute it and/or // modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of +// published by the Free Software Foundation; either version 2 of // the License, or (at your option) any later version. // // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY @@ -18,7 +19,7 @@ // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the // GNU General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public +// You should have received a copy of the GNU Lesser General Public // License and a copy of the GNU General Public License along with // Eigen. If not, see <http://www.gnu.org/licenses/>. diff --git a/test/submatrices.cpp b/test/submatrices.cpp index 6955a55ed..7bb5b2a3c 100644 --- a/test/submatrices.cpp +++ b/test/submatrices.cpp @@ -5,12 +5,12 @@ // // Eigen is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either +// License as published by the Free Software Foundation; either // version 3 of the License, or (at your option) any later version. // // Alternatively, you can redistribute it and/or // modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of +// published by the Free Software Foundation; either version 2 of // the License, or (at your option) any later version. // // Eigen is distributed in the hope that it will be useful, but WITHOUT ANY @@ -18,7 +18,7 @@ // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the // GNU General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public +// You should have received a copy of the GNU Lesser General Public // License and a copy of the GNU General Public License along with // Eigen. If not, see <http://www.gnu.org/licenses/>. @@ -78,19 +78,19 @@ template<typename MatrixType> void submatrices(const MatrixType& m) vzero = VectorType::zero(rows); Scalar s1 = ei_random<Scalar>(); - + int r1 = ei_random<int>(0,rows-1); int r2 = ei_random<int>(r1,rows-1); int c1 = ei_random<int>(0,cols-1); int c2 = ei_random<int>(c1,cols-1); - + //check row() and col() VERIFY_IS_APPROX(m1.col(c1).transpose(), m1.transpose().row(c1)); VERIFY_IS_APPROX(square.row(r1).dot(m1.col(c1)), square.lazyProduct(m1.conjugate())(r1,c1)); //check operator(), both constant and non-constant, on row() and col() m1.row(r1) += s1 * m1.row(r2); m1.col(c1) += s1 * m1.col(c2); - + //check block() Matrix<Scalar,Dynamic,Dynamic> b1(1,1); b1(0,0) = m1(r1,c1); RowVectorType br1(m1.block(r1,0,1,cols)); @@ -120,7 +120,7 @@ void EigenTest::testSubmatrices() submatrices(MatrixXcf(3, 3)); submatrices(MatrixXi(8, 12)); submatrices(MatrixXcd(20, 20)); - + // test fixed block() separately as it is a template method so doesn't support // being called as a member of a class that is itself a template parameter // (at least as of g++ 4.2) |