#include <sms.h>
|
| MatrixStreamError | initImpl (const char *firstLine) |
| | Read the first line of the matrix from the stream and attempt to determine if it is of this reader's type.
|
| |
| MatrixStreamError | nextTripleImpl (size_t &m, size_t &n, Element &v) |
| | Read the next triple of row index, column index, value and store it in the given references.
|
| |
| void | saveTriple (size_t m, size_t n, const Element &v) |
| | Save the triple (m,n,v) onto the savedTriples std::queue.
|
| |
|
| std::istream * | sin |
| | The stream that provides the data to the reader.
|
| |
| MatrixStream< Field > * | ms |
| | A pointer to the MatrixStream that is using this reader.
|
| |
| size_t | _m |
| | The number of rows in the matrix.
|
| |
| bool | knowM |
| | Indicates whether the row dimension is accurate.
|
| |
| size_t | _n |
| | Number of columns in the matrix.
|
| |
| bool | knowN |
| | Indicates whether the column dimension is accurate.
|
| |
| bool | atEnd |
| | Indicates that the end of the matrix has been reached; no more calls to nextTripleImpl will be made once this value is true.
|
| |
◆ Element
◆ SMSReader()
◆ initImpl()
Read the first line of the matrix from the stream and attempt to determine if it is of this reader's type.
- Returns
- A MatrixStreamError indicating the success or failure of the operation
Implements MatrixStreamReader< Field >.
◆ nextTripleImpl()
◆ getName()
| const char * getName |
( |
| ) |
const |
|
inlinevirtual |
◆ shortName()
| const char * shortName |
( |
| ) |
const |
|
inlinevirtual |
◆ isSparse()
Determine if this format is sparse or dense.
- Returns
- true if it is a sparse format, false if it is a dense one
Implements MatrixStreamReader< Field >.
◆ saveTriple()
| void saveTriple |
( |
size_t | m, |
|
|
size_t | n, |
|
|
const Element & | v ) |
|
protectedinherited |
Save the triple (m,n,v) onto the savedTriples std::queue.
◆ init()
◆ nextTriple()
Get the next triple of row index, column index, value and store it into the three referenced variables.
Uses the nextTripleImpl method of the subclass.
◆ getArray()
Get the whole matrix as a dense (row-major) array of elements.
By default, this implementation just repeatedly calls nextTriple to read in the whole matrix. Subclasses of dense formats should override this behavior.
- Parameters
-
| array | The array to fill with entries. May be resized as needed. Vect type must ensure that the vector is resizable |
◆ saveNext()
Reads the next triple from the subclass nextTripleImpl method and saves it to the savedTriples std::queue rather than returning it.
The error returned is that given from the subclass method.
◆ getRows()
Get the number of rows in this matrix, store it in the given int.
◆ getColumns()
Get the number of columns in this matrix, store it in the given int.
◆ sin
The stream that provides the data to the reader.
◆ ms
A pointer to the MatrixStream that is using this reader.
Useful to get an instance of the field via ms->getField().
◆ _m
The number of rows in the matrix.
This will be set by default to 0.
◆ knowM
Indicates whether the row dimension is accurate.
◆ _n
Number of columns in the matrix.
Similar requirements as _m above.
◆ knowN
Indicates whether the column dimension is accurate.
◆ atEnd
Indicates that the end of the matrix has been reached; no more calls to nextTripleImpl will be made once this value is true.
This will automatically be set to true if nextTripleImpl returns END_OF_MATRIX.
The documentation for this class was generated from the following file: