Skip to main content

evaluate_node_with_fns

Function evaluate_node_with_fns 

Source
pub fn evaluate_node_with_fns(
    arena: &DagArena,
    id: DagNodeId,
    vars: &[f64],
    registry: &FnEvalRegistry,
) -> f64
Expand description

Variant of evaluate_node that supports SymbolKind::Function nodes via a user-supplied FnEvalRegistry.

When a Function node is encountered the registry is consulted; if a matching callback is found it is called with the variable pointer. Unregistered functions fall back to 0.0 (consistent with the JIT behaviour for unresolved symbols).