einsums::tensor_io::swap_entries#

Note

Generated from the C++ headers by apiary --emit-cpp-docs-json.

Defined in header Einsums/TensorIO/Entries.hpp.

void swap_entries(std::string path, std::string first, std::string second)#

Exchange the names of the entries first and second of path.

Only the file’s entry table changes. A program that reads one entry and writes the next value beside it swaps the two after each step, so the same entry always holds the current value and one graph serves every step. See TensorFile::swap.

Added in version 2.0.0.

Throws:

std::runtime_error – when the file or either entry is missing.