diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-08-23 19:41:00 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-08-23 19:41:00 +0000 |
commit | bfe86b8fc0434cf03838bc1534f9f810594f2f08 (patch) | |
tree | 942566f88571c1fd7753e54ac1c55c0df5c3e307 /test | |
parent | c3f46cf55b7fab237edb379f501aecc619dc0038 (diff) |
* add documentation of the cool (?) "print with format" feature
* move the ioformat.cpp test to a documentation example
* rename IoFormat => IOFormat
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/ioformat.cpp | 44 |
2 files changed, 0 insertions, 45 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 680a8e65f..8964ef75d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -118,7 +118,6 @@ EI_ADD_TEST(eigensolver) EI_ADD_TEST(geometry) EI_ADD_TEST(regression) EI_ADD_TEST(svd) -EI_ADD_TEST(ioformat) EI_ADD_TEST(sparse) ENDIF(BUILD_TESTS) diff --git a/test/ioformat.cpp b/test/ioformat.cpp deleted file mode 100644 index 74b1bd583..000000000 --- a/test/ioformat.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// This file is part of Eigen, a lightweight C++ template library -// for linear algebra. Eigen itself is part of the KDE project. -// -// 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 -// 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 -// the License, or (at your option) any later version. -// -// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY -// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// 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 -// License and a copy of the GNU General Public License along with -// Eigen. If not, see <http://www.gnu.org/licenses/>. - -#include "main.h" - -void test_ioformat() -{ - std::string sep = "\n\n----------------------------------------\n\n"; - Matrix4f m1; - m1 << 0, 1.111111, 2, 3.33333, 4, 5, 6, 7, 8.888888, 9, 10, 11, 12, 13, 14, 15; - - IoFormat CommaInitFmt(4, Raw, ", ", ", ", "", "", " << ", ";"); - IoFormat CleanFmt(4, AlignCols, ", ", "\n", "[", "]"); - IoFormat OctaveFmt(4, AlignCols, ", ", ";\n", "", "", "[", "]"); - IoFormat HeavyFmt(4, AlignCols, ", ", ";\n", "[", "]", "[", "]"); - - - std::cout << m1 << sep; - std::cout << m1.format(CommaInitFmt) << sep; - std::cout << m1.format(CleanFmt) << sep; - std::cout << m1.format(OctaveFmt) << sep; - std::cout << m1.format(HeavyFmt) << sep; -} |