A Digraph for storing the relationship between groups of jobs, so that each node in this graph represents a group of jobs, and if the outputs from one group are inputs to another group, then a directed edge from the first group to the second group will be in the graph. The JobDistributor will run all of the jobs in the first group before any of the jobs in the second group will start.
More...
#include <JobDigraph.hh>
|
| typedef utility::graph::Digraph | parent |
| |
|
| | ~JobDigraph () override |
| | virtual destructor. Derived classes must ensure they've destroyed all their nodes and edges through a call to "destroy_everything" before this function is arrived at More...
|
| |
| | JobDigraph () |
| | ctor More...
|
| |
| | JobDigraph (platform::Size num_nodes) |
| | num nodes ctor More...
|
| |
| | JobDigraph (JobDigraph const &source) |
| | copy ctor. Must not be called by derived class copy ctors. More...
|
| |
| JobDigraph & | operator= (JobDigraph const &source) |
| | assignment operator. source and this must have the same type. More...
|
| |
| JobDirectedNode const * | get_job_node (platform::Size index) const |
| |
| JobDirectedNode * | get_job_node (platform::Size index) |
| |
| JobDirectedEdge * | find_job_edge (platform::Size tail_node, platform::Size head_node) |
| | returns a pointer to the directed edge connecting nodes tail_node and head_node, if that edge exists in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval. More...
|
| |
| JobDirectedEdge const * | find_job_edge (platform::Size tail_node, platform::Size head_node) const |
| | returns a const pointer to the directed edge connecting nodes tail_node and head_node, if that edge exists in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval. More...
|
| |
| void | delete_edge (utility::graph::DirectedEdge *edge) override |
| | remove an edge from the graph. (NEW AS OF 12/9/07) Never call C++'s "delete" function on an edge pointer directly. Derived classes must implement this function. If they wish to use unordered_object_pools to manage their memory More...
|
| |
|
| platform::Size | count_static_memory () const override |
| |
| platform::Size | count_dynamic_memory () const override |
| |
| utility::graph::DirectedNode * | create_new_node (platform::Size node_index) override |
| | factory method for job-directed node creation More...
|
| |
| utility::graph::DirectedEdge * | create_new_edge (platform::Size index1, platform::Size index2) override |
| | factory method for job-directed edge creation More...
|
| |
| utility::graph::DirectedEdge * | create_new_edge (utility::graph::DirectedEdge const *example_edge) override |
| | factory method for edge copy-construction More...
|
| |
A Digraph for storing the relationship between groups of jobs, so that each node in this graph represents a group of jobs, and if the outputs from one group are inputs to another group, then a directed edge from the first group to the second group will be in the graph. The JobDistributor will run all of the jobs in the first group before any of the jobs in the second group will start.
| protocols::jd3::JobDigraph::~JobDigraph |
( |
| ) |
|
|
override |
virtual destructor. Derived classes must ensure they've destroyed all their nodes and edges through a call to "destroy_everything" before this function is arrived at
destructor
References job_edge_pool_.
| protocols::jd3::JobDigraph::JobDigraph |
( |
| ) |
|
ctor
default constructor; creates an empty graph (no nodes, no edges)
Referenced by count_static_memory().
| protocols::jd3::JobDigraph::JobDigraph |
( |
platform::Size |
num_nodes | ) |
|
num nodes ctor
Do not call the base class's num-nodes constructor in the initialization list, since that constructor calls the polymorphic function create_new_node, and polymorphism does not work during constructors or destructors.
- Parameters
-
| num_ig_nodes | - [in] - number of nodes that this graph will contain |
| protocols::jd3::JobDigraph::JobDigraph |
( |
JobDigraph const & |
source | ) |
|
copy ctor. Must not be called by derived class copy ctors.
copy constructor relies on factory methods and virtual "copy_from" methods by calling the assignment operator
| platform::Size protocols::jd3::JobDigraph::count_dynamic_memory |
( |
| ) |
const |
|
overrideprotected |
| platform::Size protocols::jd3::JobDigraph::count_static_memory |
( |
| ) |
const |
|
overrideprotected |
| utility::graph::DirectedEdge * protocols::jd3::JobDigraph::create_new_edge |
( |
platform::Size |
index1, |
|
|
platform::Size |
index2 |
|
) |
| |
|
overrideprotected |
factory method for job-directed edge creation
References job_edge_pool_.
| utility::graph::DirectedEdge * protocols::jd3::JobDigraph::create_new_edge |
( |
utility::graph::DirectedEdge const * |
example_edge | ) |
|
|
overrideprotected |
| utility::graph::DirectedNode * protocols::jd3::JobDigraph::create_new_node |
( |
platform::Size |
node_index | ) |
|
|
overrideprotected |
factory method for job-directed node creation
| void protocols::jd3::JobDigraph::delete_edge |
( |
utility::graph::DirectedEdge * |
edge | ) |
|
|
override |
remove an edge from the graph. (NEW AS OF 12/9/07) Never call C++'s "delete" function on an edge pointer directly. Derived classes must implement this function. If they wish to use unordered_object_pools to manage their memory
References job_edge_pool_.
| JobDirectedEdge * protocols::jd3::JobDigraph::find_job_edge |
( |
platform::Size |
tail_node, |
|
|
platform::Size |
head_node |
|
) |
| |
returns a pointer to the directed edge connecting nodes tail_node and head_node, if that edge exists in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval.
returns the edge connecting tail_node and head_node
graph keeps a pointer to the last edge that was accessed to that search is fairly efficient.
- Parameters
-
| tail_node | - [in] - index of the first node |
| head_node | - [in] - index of the second node |
| JobDirectedEdge const * protocols::jd3::JobDigraph::find_job_edge |
( |
platform::Size |
tail_node, |
|
|
platform::Size |
head_node |
|
) |
| const |
returns a const pointer to the directed edge connecting nodes tail_node and head_node, if that edge exists in the graph, o.w. returns 0. Focuses the graph on this edge for fast subsequent retrieval.
returns the edge connecting tail_node and head_node (const version)
graph keeps a pointer to the last edge that was accessed to that search is fairly efficient.
- Parameters
-
| tail_node | - [in] - index of the tail node |
| head_node | - [in] - index of the head node |
| JobDirectedNode const* protocols::jd3::JobDigraph::get_job_node |
( |
platform::Size |
index | ) |
const |
|
inline |
| JobDirectedNode* protocols::jd3::JobDigraph::get_job_node |
( |
platform::Size |
index | ) |
|
|
inline |
assignment operator. source and this must have the same type.
operator = (). Relies on factory methods and virtual "copy_from" methods
operator= must only be performed on graphs of the same type e.g. an EnergyJobDigraph may be copied from another EnergyJobDigraph, but should not be copied from a JobDigraph.
| boost::unordered_object_pool< JobDirectedEdge >* protocols::jd3::JobDigraph::job_edge_pool_ |
|
private |
The documentation for this class was generated from the following files: