evaluate_graph

Function evaluate_graph 

Source
pub fn evaluate_graph(graph: &Graph, inputs: &[bool]) -> Vec<bool>
Expand description

Evaluate a graph and return output values as a Vec.

This is the fastest evaluation path. Input values are provided as a slice indexed by input ID. Returns output values in the same order as graph.outputs.

§Arguments

  • graph - The graph to evaluate
  • inputs - Slice of boolean values indexed by input ID. Must be large enough to contain all input IDs (i.e., inputs.len() > max_input_id).

§Returns

Vec of output values in the same order as graph.outputs.

§Panics

Panics if inputs is too small to contain all input IDs.