Provides load and store operations for sparse matrices. More...
Functions | |
template<typename Printable > | |
void | cusp::print (const Printable &p) |
print a textual representation of an object More... | |
template<typename Printable , typename Stream > | |
void | cusp::print (const Printable &p, Stream &s) |
Print a textual representation of an object on a given stream. More... | |
template<typename Matrix > | |
void | cusp::io::read_binary_file (Matrix &mtx, const std::string &filename) |
Read a binary file. More... | |
template<typename Matrix , typename Stream > | |
void | cusp::io::read_binary_stream (Matrix &mtx, Stream &input) |
Read binary data from a stream. More... | |
template<typename Matrix > | |
void | cusp::io::write_binary_file (const Matrix &mtx, const std::string &filename) |
Write a binary file. More... | |
template<typename Matrix , typename Stream > | |
void | cusp::io::write_binary_stream (const Matrix &mtx, Stream &output) |
Write binary data to a stream. More... | |
template<typename Matrix > | |
thrust::tuple< typename Matrix::index_type, typename Matrix::index_type > | cusp::io::read_dimacs_file (Matrix &mtx, const std::string &filename) |
Read a Dimacs file. More... | |
template<typename Matrix , typename Stream > | |
thrust::tuple< typename Matrix::index_type, typename Matrix::index_type > | cusp::io::read_dimacs_stream (Matrix &mtx, Stream &input) |
Read Dimacs data from a stream. More... | |
template<typename Matrix > | |
void | cusp::io::write_dimacs_file (const Matrix &mtx, const thrust::tuple< typename Matrix::index_type, typename Matrix::index_type > &t, const std::string &filename) |
Write a Dimacs file. More... | |
template<typename Matrix , typename Stream > | |
void | cusp::io::write_dimacs_stream (const Matrix &mtx, const thrust::tuple< typename Matrix::index_type, typename Matrix::index_type > &t, Stream &output) |
Write Dimacs data to a stream. More... | |
template<typename Matrix > | |
void | cusp::io::read_matrix_market_file (Matrix &mtx, const std::string &filename) |
Read a MatrixMarket file. More... | |
template<typename Matrix , typename Stream > | |
void | cusp::io::read_matrix_market_stream (Matrix &mtx, Stream &input) |
Read MatrixMarket data from a stream. More... | |
template<typename Matrix > | |
void | cusp::io::write_matrix_market_file (const Matrix &mtx, const std::string &filename) |
Write a MatrixMarket file. More... | |
template<typename Matrix , typename Stream > | |
void | cusp::io::write_matrix_market_stream (const Matrix &mtx, Stream &output) |
Write MatrixMarket data to a stream. More... | |
void cusp::print | ( | const Printable & | p | ) |
print a textual representation of an object
Printable | printable type |
p | matrix, array, or other printable object |
print
.void cusp::print | ( | const Printable & | p, |
Stream & | s | ||
) |
Print a textual representation of an object on a given stream.
Printable | printable type |
Stream | output stream type |
p | matrix, array, or other printable object |
s | stream on which to write the output |
print
.void cusp::io::read_binary_file | ( | Matrix & | mtx, |
const std::string & | filename | ||
) |
Read a binary file.
Matrix | matrix container |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
filename | file name of the binary file |
mtx
will be overwrittenwrite_binary_file
write_binary_stream
void cusp::io::read_binary_stream | ( | Matrix & | mtx, |
Stream & | input | ||
) |
Read binary data from a stream.
Matrix | matrix container |
Stream | stream type |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
input | stream from which to read the binary contents |
mtx
will be overwrittenwrite_binary_file
write_binary_stream
thrust::tuple<typename Matrix::index_type, typename Matrix::index_type> cusp::io::read_dimacs_file | ( | Matrix & | mtx, |
const std::string & | filename | ||
) |
Read a Dimacs file.
Matrix | matrix container |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
filename | file name of the Dimacs file |
mtx
will be overwrittenwrite_dimacs_file
write_dimacs_stream
thrust::tuple<typename Matrix::index_type, typename Matrix::index_type> cusp::io::read_dimacs_stream | ( | Matrix & | mtx, |
Stream & | input | ||
) |
Read Dimacs data from a stream.
Matrix | matrix container |
Stream | stream type |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
input | stream from which to read the Dimacs contents |
mtx
will be overwrittenwrite_dimacs_file
write_dimacs_stream
void cusp::io::read_matrix_market_file | ( | Matrix & | mtx, |
const std::string & | filename | ||
) |
Read a MatrixMarket file.
Matrix | matrix container |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
filename | file name of the MatrixMarket file |
mtx
will be overwrittenwrite_matrix_market_file
write_matrix_market_stream
void cusp::io::read_matrix_market_stream | ( | Matrix & | mtx, |
Stream & | input | ||
) |
Read MatrixMarket data from a stream.
Matrix | matrix container |
Stream | stream type |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
input | stream from which to read the MatrixMarket contents |
mtx
will be overwrittenwrite_matrix_market_file
write_matrix_market_stream
void cusp::io::write_binary_file | ( | const Matrix & | mtx, |
const std::string & | filename | ||
) |
Write a binary file.
Matrix | matrix container |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
filename | file name of the binary file |
read_binary_file
read_binary_stream
void cusp::io::write_binary_stream | ( | const Matrix & | mtx, |
Stream & | output | ||
) |
Write binary data to a stream.
Matrix | matrix container |
Stream | stream type |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
output | stream to which the binary contents will be written |
void cusp::io::write_dimacs_file | ( | const Matrix & | mtx, |
const thrust::tuple< typename Matrix::index_type, typename Matrix::index_type > & | t, | ||
const std::string & | filename | ||
) |
Write a Dimacs file.
Matrix | matrix container |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
t | a tuple of indices specifying the source and sink vertices |
filename | file name of the Dimacs file |
read_dimacs_file
read_dimacs_stream
void cusp::io::write_dimacs_stream | ( | const Matrix & | mtx, |
const thrust::tuple< typename Matrix::index_type, typename Matrix::index_type > & | t, | ||
Stream & | output | ||
) |
Write Dimacs data to a stream.
Matrix | matrix container |
Stream | stream type |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
t | a tuple of indices specifying the source and sink vertices |
output | stream to which the Dimacs contents will be written |
void cusp::io::write_matrix_market_file | ( | const Matrix & | mtx, |
const std::string & | filename | ||
) |
Write a MatrixMarket file.
Matrix | matrix container |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
filename | file name of the MatrixMarket file |
read_matrix_market_file
read_matrix_market_stream
void cusp::io::write_matrix_market_stream | ( | const Matrix & | mtx, |
Stream & | output | ||
) |
Write MatrixMarket data to a stream.
Matrix | matrix container |
Stream | stream type |
mtx | a matrix container (e.g. csr_matrix or coo_matrix ) |
output | stream to which the MatrixMarket contents will be written |