From bfe86b8fc0434cf03838bc1534f9f810594f2f08 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 23 Aug 2008 19:41:00 +0000 Subject: * add documentation of the cool (?) "print with format" feature * move the ioformat.cpp test to a documentation example * rename IoFormat => IOFormat --- test/CMakeLists.txt | 1 - test/ioformat.cpp | 44 -------------------------------------------- 2 files changed, 45 deletions(-) delete mode 100644 test/ioformat.cpp (limited to 'test') 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 -// -// 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 . - -#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; -} -- cgit v1.2.3