DiSMEC++
|
Go to the source code of this file.
Classes | |
struct | dismec::io::NpyHeaderData |
Contains the data of the header of a npy file with an array that has at most 2 dimensions. More... | |
Namespaces | |
dismec | |
Main namespace in which all types, classes, and functions are defined. | |
dismec::io | |
Functions | |
bool | dismec::io::is_npy (std::istream &target) |
Check whether the stream is a npy file. More... | |
void | dismec::io::write_npy_header (std::streambuf &target, std::string_view description) |
Writes the header for a npy file. More... | |
std::string | dismec::io::make_npy_description (std::string_view dtype_desc, bool column_major, std::size_t size) |
Creates a string with the data description dictionary for (1 dimensional) arrays. More... | |
std::string | dismec::io::make_npy_description (std::string_view dtype_desc, bool column_major, std::size_t rows, std::size_t cols) |
Creates a string with the data description dictionary for matrices. More... | |
NpyHeaderData | dismec::io::parse_npy_header (std::streambuf &source) |
Parses the header of the npy file given by source . More... | |
template<class S > | |
const char * | dismec::io::data_type_string () |
template<class Derived > | |
std::string | dismec::io::make_npy_description (const Eigen::DenseBase< Derived > &matrix) |
Generates the npy description string based on an Eigen matrix. More... | |
types::DenseRowMajor< real_t > | dismec::io::load_matrix_from_npy (std::istream &source) |
Loads a matrix from a numpy array. More... | |
types::DenseRowMajor< real_t > | dismec::io::load_matrix_from_npy (const std::string &path) |
void | dismec::io::save_matrix_to_npy (std::ostream &source, const types::DenseRowMajor< real_t > &) |
Saves a matrix to a numpy array. More... | |
void | dismec::io::save_matrix_to_npy (const std::string &path, const types::DenseRowMajor< real_t > &) |