9 #include <fei_macros.hpp>
10 #include <fei_ostream_ops.hpp>
12 #include <fei_Vector.hpp>
13 #include <fei_Matrix.hpp>
14 #include <fei_FillableMat.hpp>
15 #include <fei_CSRMat.hpp>
16 #include <fei_CSVec.hpp>
31 FEI_OSTREAM&
operator<<(FEI_OSTREAM& os, fei::FillableMat& mat)
33 os <<
"num rows: " << mat.getNumRows() << FEI_ENDL;
34 fei::FillableMat::iterator
35 iter = mat.begin(), iter_end = mat.end();
37 for(; iter!=iter_end; ++iter) {
38 int row = iter->first;
40 const std::vector<int>& v_ind = v->indices();
41 const std::vector<double>& v_coef = v->coefs();
43 for(
size_t i=0; i<v_ind.size(); ++i) {
44 os <<
"("<<v_ind[i]<<
","<<v_coef[i]<<
") ";
54 size_t len = vec.size();
56 os <<
" numEntries: " << len << FEI_ENDL;
58 for(
size_t i=0; i<len; ++i) {
59 os <<
" " << vec.indices()[i]<<
": "<<vec.coefs()[i] << FEI_ENDL;
67 os <<
"num rows: " << mat.getNumRows() << FEI_ENDL;
69 const std::vector<int>& rows = mat.getGraph().
rowNumbers;
70 const int* rowoffs = &(mat.getGraph().
rowOffsets[0]);
72 const double* coefs = &(mat.getPackedCoefs()[0]);
74 for(
size_t i=0; i<rows.size(); ++i) {
78 for(
int j=rowoffs[i]; j<rowoffs[i+1]; ++j) {
79 os <<
"("<<cols[j]<<
","<<coefs[j]<<
") ";
std::ostream & operator<<(std::ostream &os, const Teuchos::SerialBandDenseMatrix< OrdinalType, ScalarType > &obj)
std::vector< int > rowNumbers
std::vector< int > packedColumnIndices
std::vector< int > rowOffsets
virtual int writeToStream(FEI_OSTREAM &ostrm, bool matrixMarketFormat=true)=0
virtual int writeToStream(FEI_OSTREAM &ostrm, bool matrixMarketFormat=true)=0