|
DenseLinAlgPack: Concreate C++ Classes for Dense Blas-Compatible Linear Algebra Version of the Day
|
00001 // @HEADER 00002 // *********************************************************************** 00003 // 00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization 00005 // Copyright (2003) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 // @HEADER 00028 00029 #ifndef GENMATRIX_OUT_FUNC_H 00030 #define GENMATRIX_OUT_FUNC_H 00031 00032 #include "DenseLinAlgPack_IOBasic.hpp" 00033 00034 namespace DenseLinAlgPack { 00035 00036 /* * @name DMatrixSlice output stream function. 00037 * 00038 * This is a function that are used to output a DMatrixSlice object 00039 * to a char based output stream. This format is ment to be both 00040 * human and machine readable. In fact the \Ref{input} function 00041 * can be used to read in the output produced by this function. 00042 * This function is ment to be the machinary for an optional output stream 00043 * operator \Ref{operator<<}. 00044 * 00045 * The output format is diferent depending on the on whether the 00046 * bits #LinAlgPackIO::ignore_dim_bit# and #LinAlgPackIO::no_insert_newlines_bit# are set. 00047 * The default output format is (exta_flags == 0): 00048 * 00049 * #gms.rows() gms.cols()#\\ 00050 * #gms(1,1) gms(1,2) gms(1,3) ... gms(1,gms.cols())#\\ 00051 * #gms(2,1) gms(2,2) gms(2,3) ... gms(2,gms.cols())#\\ 00052 * # . . . .#\\ 00053 * #gms(gms.rows(),1) gms(gms.rows(),2) gms(gms.rows(),3) gms(gms.rows(),gms.cols())#\\ 00054 * 00055 * If #extra_flags & LinAlgPackIO::ignore_dim_bit != 0# then the dimensions of the 00056 * matrix are not output and if #extra_flags & LinAlgPackIO::no_insert_newlines_bit != 0# 00057 * then newline char ('\n') are not inserted after each row. 00058 * 00059 * Each of the elements are are put into columns according to the width set in the 00060 * output stream #os# when it is called and other formating commands. Even if the set 00061 * width is 0 or less than 00062 * the number of char's for the element a space ' ' will be inserted between them. 00063 * The elements are formated according to the format in the stream #os#. 00064 * 00065 * If #gms.rows() == 0# then no elements will be output and if 00066 * #extra_flags & LinAlgPackIO::ignore_dim_bit != 0# and only the operation 00067 * #os << gms.rows() << ' ' << gms.cols() << endl;# will be performed. 00068 * 00069 * If any of the output operations fails then a #std::ios_base::failure# exception is thrown. 00070 */ 00071 std::ostream& output(std::ostream& os, const DMatrixSlice& gms, LinAlgPackIO::fmtflags extra_flags); 00072 00073 } // end namespace DenseLinAlgPack 00074 00075 #endif // GENMATRIX_OUT_FUNC_H
1.7.4