Template Class MTXReader
Defined in File mtx_reader.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Types
public sparsebase::io::Reader
(Class Reader)public sparsebase::io::ReadsCSR< IDType, NNZType, ValueType >
(Template Class ReadsCSR)public sparsebase::io::ReadsCOO< IDType, NNZType, ValueType >
(Template Class ReadsCOO)public sparsebase::io::ReadsArray< ValueType >
(Template Class ReadsArray)
Class Documentation
-
template<typename IDType, typename NNZType, typename ValueType>
class sparsebase::io::MTXReader : public sparsebase::io::Reader, public sparsebase::io::ReadsCSR<IDType, NNZType, ValueType>, public sparsebase::io::ReadsCOO<IDType, NNZType, ValueType>, public sparsebase::io::ReadsArray<ValueType> Reader for the Matrix Market File Format.
Detailed explanations of the MTX format can be found in these links:
Public Functions
-
explicit MTXReader(std::string filename, bool convert_to_zero_index = true)
Constructor for the MTXReader class
- Parameters
filename – path to the file to be read
convert_to_zero_index – if set to true the indices will be converted such that they start from 0 instead of 1
-
virtual format::COO<IDType, NNZType, ValueType> *ReadCOO() const override
Reads the file to a COO instance and returns a pointer to it.
-
virtual format::CSR<IDType, NNZType, ValueType> *ReadCSR() const override
Reads the file to a CSR instance and returns a pointer to it.
-
virtual format::Array<ValueType> *ReadArray() const override
Reads the file to an Array instance and returns a pointer to it.
-
~MTXReader() override