MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces
AbstractLinAlgPack_COOMatrixTmplOutFuncDecl.hpp File Reference
#include "SparseLinAlgPackIOBasic.hpp"
Include dependency graph for AbstractLinAlgPack_COOMatrixTmplOutFuncDecl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 AbstractLinAlgPack
 

COO matrix output stream function.

This is a functions that are used to output a templated COO matrix object to a char based output stream. The COOMatrixTemplateInterface specification is used.

The output format is diferent depending on whether the bits #SparseLinAlgPackIO::ignore_dim_bit#, #LinAlgPackIO::no_insert_newlines_bit# , and #SparseLinAlgPackIO::ignore_nz_bit# are set. The default output format is:

#rows cols nz#\

val1:i1:j1 val2:i2:j2 ... valnz:inz:jnz#\

Each of the elements (val:i:j) are are put into columns according to the width set in the output stream #os# and other formating commands when it is called. Even if the set width is 0 or less than the number of char's for the element a space ' ' will be inserted between them. The elements are formated according to the format in the stream #os#.

If #exta_flags & SparseLinAlgPackIO::ignore_dim_bit# == 0# then #rows# and #cols# will not be output.

If #exta_flags & SparseLinAlgPackIO::ignore_nz_bit# == 0# then #nz# will not be output.

If #exta_flags & LinAlgPackIO::no_insert_newlines_bit == 0# then a newline charactor will not be inserted after the last element, otherwise (by default) it will be.

If coom.nz() == 0# then no elements will be output.

If any of the output operations fails then a #std::ios_base::failure# exception is thrown.

template<class T_COOM >
std::ostream & AbstractLinAlgPack::output_COOM (std::ostream &os, const T_COOM &coom, SparseLinAlgPackIO::fmtflags extra_flags)