Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes Class Reference

The nodes that a load has read, by their index in the stream. More...

Collaboration diagram for Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes:
[legend]

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
 

Detailed Description

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
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.

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.

Constructor & Destructor Documentation

◆ Loaded_Nodes()

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::Loaded_Nodes ( const size_t  num_nodes)
inlineexplicit

Member Function Documentation

◆ add()

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
void Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::add ( GT &  g,
std::unique_ptr< typename GT::Node >  p 
)
inline

◆ node()

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
GT::Node * Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::node ( const int  idx,
const size_t  i,
const char *  end 
) const
inline

◆ remove_from()

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
void Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::remove_from ( GT &  g)
inline

◆ throw_invalid_index()

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
void Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::throw_invalid_index ( const int  idx,
const size_t  i,
const char *  end 
) const
inlineprivate

Member Data Documentation

◆ Max_Reserved

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
constexpr size_t Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::Max_Reserved = size_t(1) << 20
staticconstexprprivate

Definition at line 791 of file io_graph.H.

◆ num_loaded

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
size_t Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::num_loaded = 0
private

◆ reserved

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
size_t Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::reserved = 0
private

◆ table

template<AlephGraph GT, class Load_Node = Dft_Load_Node<GT>, class Store_Node = Dft_Store_Node<GT>, class Load_Arc = Dft_Load_Arc<GT>, class Store_Arc = Dft_Store_Arc<GT>, NodeFilter< GT > NF = Aleph::Dft_Show_Node<GT>, ArcFilter< GT > AF = Aleph::Dft_Show_Arc<GT>>
DynArray<typename GT::Node*> Aleph::IO_Graph< GT, Load_Node, Store_Node, Load_Arc, Store_Arc, NF, AF >::Loaded_Nodes::table
private

The documentation for this class was generated from the following file: