|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
The nodes that a load has read, by their index in the stream. More...
Public Member Functions | |
| Loaded_Nodes (const size_t num_nodes) | |
Reserve for num_nodes nodes, the count of the stream, or Max_Reserved if it is greater. | |
| void | add (GT &g, std::unique_ptr< typename GT::Node > p) |
Insert the node p, loaded, into g, as the node of the next index. | |
| GT::Node * | node (const int idx, const size_t i, const char *end) const |
The node of index idx of the stream, an end of the arc i. | |
| void | remove_from (GT &g) |
Remove from g the nodes read, with their arcs: a load failed. | |
Private Member Functions | |
| void | throw_invalid_index (const int idx, const size_t i, const char *end) const |
Private Attributes | |
| DynArray< typename GT::Node * > | table |
| size_t | reserved = 0 |
| size_t | num_loaded = 0 |
Static Private Attributes | |
| static constexpr size_t | Max_Reserved = size_t(1) << 20 |
The nodes that a load has read, by their index in the stream.
The count of the stream is not trusted to reserve memory: it reserves for Max_Reserved nodes at most, and grows beyond as the nodes are read; the indices of the arcs are checked against the nodes read.
Definition at line 789 of file io_graph.H.
|
inlineexplicit |
Reserve for num_nodes nodes, the count of the stream, or Max_Reserved if it is greater.
Definition at line 801 of file io_graph.H.
References Aleph::DynArray< T >::reserve(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::reserved, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::table.
|
inline |
Insert the node p, loaded, into g, as the node of the next index.
Definition at line 809 of file io_graph.H.
References Aleph::DynArray< T >::access(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::g, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::insert_node(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::num_loaded, Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::reserved, Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::table, and Aleph::DynArray< T >::touch().
Referenced by Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode().
|
inline |
The node of index idx of the stream, an end of the arc i.
| std::runtime_error | if idx is not the index of a node read |
Definition at line 820 of file io_graph.H.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::num_loaded, Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::table, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::throw_invalid_index().
Referenced by Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode().
|
inline |
Remove from g the nodes read, with their arcs: a load failed.
Definition at line 841 of file io_graph.H.
References Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::g, Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::num_loaded, Aleph::List_Graph< _Graph_Node, _Graph_Arc >::remove_node(), and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::table.
Referenced by Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load(), and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::load_in_text_mode().
|
inlineprivate |
Definition at line 832 of file io_graph.H.
References ah_runtime_error, and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::num_loaded.
Referenced by Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::node().
|
staticconstexprprivate |
Definition at line 791 of file io_graph.H.
|
private |
Definition at line 795 of file io_graph.H.
Referenced by Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::add(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::node(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::remove_from(), and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::throw_invalid_index().
|
private |
|
private |
Definition at line 793 of file io_graph.H.
Referenced by Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::Loaded_Nodes(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::add(), Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::node(), and Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::remove_from().