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

namespace  AbstractLinAlgPack

Functions

template<class T_COOM>
std::ostream & output_COOM (std::ostream &os, const T_COOM &coom, SparseLinAlgPackIO::fmtflags extra_flags)
 COO matrix output stream function.


Function Documentation

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

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.

Definition at line 40 of file AbstractLinAlgPack_COOMatrixTmplOutFuncDef.hpp.


Generated on Thu Sep 18 12:35:22 2008 for MOOCHO (Single Doxygen Collection) by doxygen 1.3.9.1