|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Graph serialization and deserialization utilities. More...
#include <algorithm>#include <fstream>#include <iostream>#include <memory>#include <type_traits>#include <tpl_graph.H>#include <ah-graph-concepts.H>#include <ah-errors.H>Go to the source code of this file.
Classes | |
| struct | Aleph::Dft_Store_Node< GT > |
| Default node storage functor for binary and text modes. More... | |
| struct | Aleph::Dft_Store_Arc< GT > |
| Default arc storage functor for binary and text modes. More... | |
| struct | Aleph::Dft_Load_Node< GT > |
| Default node loading functor for binary and text modes. More... | |
| struct | Aleph::Dft_Load_Arc< GT > |
| Default arc loading functor for binary and text modes. More... | |
| class | Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF > |
| Graph serialization and deserialization class. More... | |
| class | Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes |
| The nodes that a load has read, by their index in the stream. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Graph serialization and deserialization utilities.
This file provides the IO_Graph class for reading and writing graphs to/from files in binary and text formats. The serialization format is customizable through functor template parameters.
The default functors of the binary mode copy the bytes of the infos, so that they take only infos that are trivially copyable: for other ones, as std::string, define custom load/store functors:
The counts are written as size_t and the indices as int, and the default functors write the bytes of the infos, all in the order of the bytes of the machine: a binary file is read back on a machine with the same sizes and the same endianness. The text mode does not depend on them.
Definition in file io_graph.H.