Header-only Eigen matrix text I/O — round-trips dense matrices to whitespace-separated ASCII for cross-validation against MNE-Python. More...
#include "utils_global.h"#include <string>#include <sstream>#include <vector>#include <fstream>#include <QSharedPointer>#include <QTextStream>#include <QFile>#include <QDebug>#include <QStringList>#include <QRegularExpression>#include <Eigen/Core>

Go to the source code of this file.
Classes | |
| class | UTILSLIB::IOUtils |
| Eigen matrix I/O utilities. More... | |
Namespaces | |
| namespace | UTILSLIB |
| Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms). | |
Header-only Eigen matrix text I/O — round-trips dense matrices to whitespace-separated ASCII for cross-validation against MNE-Python.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2013-2026 MNE-CPP Authors
UTILSLIB::IOUtils provides a single, overload-rich API for writing and reading Eigen::Matrix instances in plain text with an optional two-line header (rows x cols / description). Every other mne-cpp library, test binary, and example tool uses these helpers when it needs to dump an intermediate matrix to disk for inspection in Python / MATLAB or to compare reference data committed to the bin/ MNE-CPP-Test-Data repository against freshly-computed C++ results.
The class is templated on scalar type and dimensionality (dynamic, row-vector and column-vector specialisations) and accepts both QString and std::string paths so callers can choose whichever string flavour is idiomatic for their surrounding code without an extra conversion.
Definition in file ioutils.h.