Since only CSR format is supported by the MatrixHandler methods for matrix-vector product and matrix norm, these methods will now check if the matrix is CSR and, if not, return an error. When (if) MatrixHandler supports other sparse formats, we can add switch to those methods to perform computations specific to the (supported) input matrix format.
This PR:
Removes input argument from matvec method specifying the matrix format.
Adds member variable with matrix format ID to matrix::Sparse class. Each derived class (Csr, Csc, etc.) sets this ID at construction. This allows matvec and matrixNorm to check matrix format "under the hood".
Resolves #180.
Updates examples and tests with new MatrixHandler::matvec interface.
Since only CSR format is supported by the
MatrixHandler
methods for matrix-vector product and matrix norm, these methods will now check if the matrix is CSR and, if not, return an error. When (if)MatrixHandler
supports other sparse formats, we can add switch to those methods to perform computations specific to the (supported) input matrix format.This PR:
matvec
method specifying the matrix format.matrix::Sparse
class. Each derived class (Csr
,Csc
, etc.) sets this ID at construction. This allowsmatvec
andmatrixNorm
to check matrix format "under the hood".MatrixHandler::matvec
interface.