|
MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
|
Line source for Matrix Market input: reads from a plain file, or transparently from a gzip-compressed ".gz" file when built with zlib. More...
#include <matrix_market.hpp>
Public Member Functions | |
| mm_reader (const std::string &filename) | |
| bool | size_known () const noexcept |
| Whether the input's size is known: a plain file whose size the filesystem reports (not gzip, not a pipe). | |
| std::size_t | max_entries () const noexcept |
| The most coordinate entry lines the file can hold: one takes at least 6 bytes ("1 1 1\n"). | |
| std::size_t | max_values () const noexcept |
| The most array values the file can hold: one takes at least 2 bytes ("1\n"), the last 1. | |
| bool | next_line (std::string &out) |
| Read one logical line (newline stripped, CRLF-safe). Returns false at EOF. | |
Line source for Matrix Market input: reads from a plain file, or transparently from a gzip-compressed ".gz" file when built with zlib.
One small abstraction so the parsers are agnostic to compression.
|
inlineexplicit |
|
inlinenoexcept |
The most coordinate entry lines the file can hold: one takes at least 6 bytes ("1 1 1\n").
Unbounded when the size is unknown.
|
inlinenoexcept |
The most array values the file can hold: one takes at least 2 bytes ("1\n"), the last 1.
Unbounded when the size is unknown.
|
inline |
Read one logical line (newline stripped, CRLF-safe). Returns false at EOF.
|
inlinenoexcept |
Whether the input's size is known: a plain file whose size the filesystem reports (not gzip, not a pipe).