MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
write_el.hpp File Reference
#include <fstream>
#include <string>
#include <stdexcept>
#include <mtl/mat/compressed2D.hpp>

Namespaces

namespace  mtl
namespace  mtl::io

Functions

template<typename Matrix>
void mtl::io::write_dense (const std::string &filename, const Matrix &A, char delimiter=',')
 Write a dense matrix to a CSV or whitespace-delimited file.
template<typename Value, typename Parameters>
void mtl::io::write_sparse (const std::string &filename, const mat::compressed2D< Value, Parameters > &A)
 Write a sparse matrix to a triplet file (0-based indices).