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

Namespaces

namespace  mtl
namespace  mtl::io
namespace  mtl::io::detail

Functions

bool mtl::io::detail::split_fields (std::string_view line, char delimiter, std::vector< std::string_view > &fields)
 The fields of one line.
template<typename Value = double>
mat::dense2D< Value > mtl::io::read_dense (const std::string &filename, char delimiter=',')
 Read a dense matrix from a CSV or whitespace-delimited file.
template<typename Value = double>
mat::compressed2D< Value > mtl::io::read_sparse (const std::string &filename, std::size_t nrows, std::size_t ncols)
 Read a sparse matrix from a triplet file (row col value per line, 0-based).