#include <mtxdataiterator.h>
Collaboration diagram for MtxDataIterator:
Definition at line 40 of file mtxdataiterator.h.
MtxDataIterator::MtxDataIterator | ( | istream & | istr, | |
bool | iterate_mirror | |||
) |
Create MtxDataIterator
istr | input stream: source of MatrixMarket data | |
iterate_mirror | if false only stored element will be iterated, if true also mirrored elements (in the case of symmetric, hermitian or skew matrices) will be iterated. |
Definition at line 25 of file mtxdataiterator.cpp.
References _iterate_mirror, _last_mirrored, general, get_storage_scheme(), read_header(), and read_next_triplet().
Here is the call graph for this function:
MtxDataIterator::~MtxDataIterator | ( | ) | [virtual] |
Definition at line 37 of file mtxdataiterator.cpp.
bool MtxDataIterator::eof | ( | ) | const [inline] |
true if all matrix have been iterated through.
Definition at line 74 of file mtxdataiterator.h.
References _nnz, and _nnz_read.
Referenced by MtxReader0::read(), MtxReader::read(), BalancedMtxReader::read(), and read_next_triplet().
const int & MtxDataIterator::get_cols | ( | ) | const [virtual] |
Read property of int cols.
Definition at line 115 of file mtxdataiterator.cpp.
References _cols.
Referenced by MtxReader0::read(), and BalancedMtxReader::read().
virtual const ElementType& MtxDataIterator::get_element_type | ( | ) | const [inline, virtual] |
Read property of ElementType _element_type.
Definition at line 83 of file mtxdataiterator.h.
References _element_type.
Referenced by MtxReader0::read(), and MtxReader::read().
virtual const MatrixType& MtxDataIterator::get_matrix_type | ( | ) | const [inline, virtual] |
Read property of StorageType _storage_type.
Definition at line 77 of file mtxdataiterator.h.
References _matrix_type.
const int & MtxDataIterator::get_nnz | ( | ) | const [virtual] |
Number of matrix elements stored in input stream. The number of iterated elements may be higher, because of mirrored elements.
Definition at line 123 of file mtxdataiterator.cpp.
References _nnz.
const int & MtxDataIterator::get_rows | ( | ) | const [virtual] |
Read property of int rows.
Definition at line 109 of file mtxdataiterator.cpp.
References _rows.
Referenced by MtxReader0::read(), and BalancedMtxReader::read().
virtual const StorageScheme& MtxDataIterator::get_storage_scheme | ( | ) | const [inline, virtual] |
Read property of StorageType _storage_scheme.
Definition at line 80 of file mtxdataiterator.h.
References _storage_scheme.
Referenced by MtxDataIterator(), operator++(), MtxReader0::read(), and MtxReader::read().
Triplet& MtxDataIterator::operator * | ( | ) | [inline] |
Returns current matrix entry as a triplet
Definition at line 69 of file mtxdataiterator.h.
References _triplet.
MtxDataIterator & MtxDataIterator::operator++ | ( | ) |
Increment operator: iterate to next matrix entry
Definition at line 150 of file mtxdataiterator.cpp.
References _iterate_mirror, _last_mirrored, _triplet, MtxDataIterator::Triplet::col, get_storage_scheme(), read_next_triplet(), MtxDataIterator::Triplet::row, skew, and MtxDataIterator::Triplet::val.
Here is the call graph for this function:
void MtxDataIterator::read_header | ( | ) | [protected] |
Read MatrixMarket header and store information in member variables
Definition at line 41 of file mtxdataiterator.cpp.
References _cols, _element_type, _istr, _matrix_type, _nnz, _rows, _storage_scheme, complex, general, hermitian, integer, pattern, real, skew, sparse, and symmetric.
Referenced by MtxDataIterator().
void MtxDataIterator::read_next_triplet | ( | ) | [protected] |
Read the next matrix entry and store it in the _triplet member variable
Definition at line 130 of file mtxdataiterator.cpp.
References _istr, _nnz, _nnz_read, _triplet, MtxDataIterator::Triplet::col, eof(), MtxDataIterator::Triplet::row, and MtxDataIterator::Triplet::val.
Referenced by MtxDataIterator(), and operator++().
Here is the call graph for this function:
int MtxDataIterator::_cols [protected] |
Number of matrix columns
Definition at line 92 of file mtxdataiterator.h.
Referenced by get_cols(), and read_header().
ElementType MtxDataIterator::_element_type [protected] |
complex, real, pattern, integer
Definition at line 108 of file mtxdataiterator.h.
Referenced by get_element_type(), and read_header().
istream* MtxDataIterator::_istr [protected] |
Input stream: data source
Definition at line 98 of file mtxdataiterator.h.
Referenced by read_header(), and read_next_triplet().
bool MtxDataIterator::_iterate_mirror [protected] |
Definition at line 110 of file mtxdataiterator.h.
Referenced by MtxDataIterator(), and operator++().
bool MtxDataIterator::_last_mirrored [protected] |
true if the last iterated elment was a mirrored element, false otherwise
Definition at line 112 of file mtxdataiterator.h.
Referenced by MtxDataIterator(), and operator++().
MatrixType MtxDataIterator::_matrix_type [protected] |
sparse or dense
Definition at line 104 of file mtxdataiterator.h.
Referenced by get_matrix_type(), and read_header().
int MtxDataIterator::_nnz [protected] |
Number of nonzero entries in input stream
Definition at line 96 of file mtxdataiterator.h.
Referenced by eof(), get_nnz(), read_header(), and read_next_triplet().
int MtxDataIterator::_nnz_read [protected] |
number of entries read so far
Definition at line 102 of file mtxdataiterator.h.
Referenced by eof(), and read_next_triplet().
int MtxDataIterator::_rows [protected] |
Number of matrix rows
Definition at line 94 of file mtxdataiterator.h.
Referenced by get_rows(), and read_header().
StorageScheme MtxDataIterator::_storage_scheme [protected] |
symmetric, general, skew, hermitian
Definition at line 106 of file mtxdataiterator.h.
Referenced by get_storage_scheme(), and read_header().
Triplet MtxDataIterator::_triplet [protected] |
current matrix entry as a (row, col, val) triplet
Definition at line 100 of file mtxdataiterator.h.
Referenced by operator *(), operator++(), and read_next_triplet().