HLIBpro  3.0
TAutoMatrixIO Class Reference

Class for matrix I/O with automatic file format detection.

#include <TMatrixIO.hh>

Public Member Functions

template<typename value_t >
void write (const TMatrix< value_t > *A, const std::string &filename) const
 write matrix A to file filename
 
template<typename value_t >
void write (const TMatrix< value_t > *A, const std::string &filename, const std::string &matname) const
 
template<typename value_t >
std::unique_ptr< TMatrix< value_t > > read (const std::string &name) const
 read and return matrix from file filename
 
template<typename value_t >
std::unique_ptr< TMatrix< value_t > > read (const std::string &filename, const std::string &matname) const
 

Member Function Documentation

◆ read()

std::unique_ptr< TMatrix< value_t > > read ( const std::string &  filename,
const std::string &  matname 
) const

read and return matrix from file filename with optional matrix name matname (if file format has corresponding support)

◆ write()

void write ( const TMatrix< value_t > *  A,
const std::string &  filename,
const std::string &  matname 
) const

write matrix A to file filename with optional matrix name matname (if file format has corresponding support)