32namespace neograph::graph {
46 std::string node_name;
47 std::optional<std::string> command_goto;
60 std::vector<std::string> ready;
66 std::optional<std::string> winning_command_goto;
96 std::vector<std::set<std::string>> slots;
98 bool operator==(
const JoinSpec&)
const =
default;
128 const std::vector<ConditionalEdge>& conditional_edges,
133 const std::vector<ConditionalEdge>& conditional_edges,
135 std::shared_ptr<const GraphRegistry> registry);
139 const std::vector<ConditionalEdge>& conditional_edges,
142 std::shared_ptr<const GraphRegistry> registry);
146 const std::vector<ConditionalEdge>& conditional_edges,
149 std::map<std::string, std::string> failure_targets,
150 std::shared_ptr<const GraphRegistry> registry);
173 const std::string& current,
const GraphState& state)
const;
230 const std::vector<NodeResult>& results,
266 const std::vector<NodeResult>& results,
285 const std::vector<bool>& failed)
const;
301 const std::vector<Edge>& edges_;
302 const std::vector<ConditionalEdge>& conditional_edges_;
305 std::shared_ptr<const GraphRegistry> registry_;
306 std::map<std::string, std::string> failure_targets_;
NEOGRAPH_API export/import macro for shared-library builds.
Thread-safe container for all graph state channels.
Immutable routing oracle for a compiled graph.
bool ends_implicitly(const std::string &node) const
True when node has neither a conditional edge nor a static edge, so it reaches END_NODE only implicit...
NextStepPlan plan_next_step(const std::vector< StepRouting > &routings, const GraphState &state) const
Decide the next ready set from this super-step's routing.
NextStepPlan plan_next_step(const std::vector< StepRouting > &routings, const GraphState &state, BarrierState &barrier_state, const std::vector< bool > &failed) const
Barrier-aware planning with handled failures (#364).
std::vector< std::string > plan_start_step() const
Nodes directly routed from __start__ at step 0.
Scheduler(const std::vector< Edge > &edges, const std::vector< ConditionalEdge > &conditional_edges, BarrierSpecs barrier_specs={})
Bind the scheduler to the graph's edge topology.
std::vector< std::string > resolve_next_nodes(const std::string ¤t, const GraphState &state) const
Resolve the direct successors of a node.
const std::string * failure_target(const std::string &node) const
The failure target of node, or null when it has no failure edge.
const JoinSpecs & join_specs() const
Read-only view of declared any_of joins (#363).
const BarrierSpecs & barrier_specs() const
Read-only view of declared barriers (mainly for tests).
NextStepPlan plan_next_step(const std::vector< std::string > &just_ran, const std::vector< NodeResult > &results, const GraphState &state) const
Convenience overload: pair up ready[i] with results[i].
Scheduler(const std::vector< Edge > &edges, const std::vector< ConditionalEdge > &conditional_edges, BarrierSpecs barrier_specs, JoinSpecs join_specs, std::map< std::string, std::string > failure_targets, std::shared_ptr< const GraphRegistry > registry)
Also bind failure edges (#364): failing node -> failure target.
Scheduler(const std::vector< Edge > &edges, const std::vector< ConditionalEdge > &conditional_edges, BarrierSpecs barrier_specs, JoinSpecs join_specs, std::shared_ptr< const GraphRegistry > registry)
Bind routing with legacy barriers and any_of joins (#363).
NextStepPlan plan_next_step(const std::vector< std::string > &just_ran, const std::vector< NodeResult > &results, const GraphState &state, BarrierState &barrier_state) const
NodeResult-taking barrier-aware overload.
Scheduler(const std::vector< Edge > &edges, const std::vector< ConditionalEdge > &conditional_edges, BarrierSpecs barrier_specs, std::shared_ptr< const GraphRegistry > registry)
Bind routing to a per-engine registry overlay.
NextStepPlan plan_next_step(const std::vector< StepRouting > &routings, const GraphState &state, BarrierState &barrier_state) const
Barrier-aware planning.
Graph engine type definitions: channels, edges, nodes, events, and control flow.
std::map< std::string, JoinSpec > JoinSpecs
Joins with at least one multi-alternative slot, by join node name.
std::map< std::string, std::set< std::string > > BarrierSpecs
Static barrier declarations extracted at graph-compile time.
std::map< std::string, std::set< std::string > > BarrierState
Per-barrier signal bookkeeping.
An AND join whose wait_for slots may each list alternatives (#363).
Plan for the next super-step.
bool hit_explicit_end
END_NODE was reached explicitly: an edge or route to it, or a Command.goto.
Per-node routing signal emitted by this super-step.