Expand description
spectrafit-graph — DAG compilation and evaluation engine.
Exposes three top-level functions consumed by the solver and pyo3 bindings:
evaluate— sum of all node contributions at given x-pointsevaluate_components— per-node contributionsjacobian— full analytical Jacobian matrix [n_points × n_free_params]
Structs§
- Compiled
Graph - The compiled representation of a
FitGraphSpec, ready for evaluation. - Tied
Param - A single tied-parameter assignment:
target = expr. - Tied
Plan - A dependency-ordered plan for evaluating tied parameters.
Enums§
- BinOp
- A binary arithmetic operator in the restricted grammar.
- Expr
- Parsed expression abstract syntax tree.
- Graph
Error - Errors produced by the graph compiler and executor.
Functions§
- evaluate
- Evaluate the model sum across all nodes at the given x-points.
- evaluate_
compiled - Evaluate the model sum at each x-point.
- evaluate_
compiled_ indexed - Evaluate the model sum using pre-computed per-node parameter buffers.
- evaluate_
components - Evaluate each node independently.
- evaluate_
components_ compiled - Evaluate each node independently.
- jacobian
- Compute the full analytical Jacobian matrix for use by the solver.
- jacobian_
compiled - Compute the analytical Jacobian matrix using a pre-built flat param map.
- jacobian_
compiled_ indexed - Compute the analytical Jacobian using pre-computed per-node param buffers.
- jacobian_
compiled_ indexed_ into - Compute the analytical Jacobian using a reusable row-major scratch buffer.
- jacobian_
compiled_ indexed_ weighted_ into - Compute the weighted analytical Jacobian into a reusable row-major buffer.
- parse_
expr - Parse a restricted-grammar expression string into an
ExprAST. - residuals_
compiled_ indexed_ into - Compute weighted residuals
r[i] = (ŷ[i] − y[i]) / σ[i]intooutusing pre-computed per-node parameter buffers. Honours per-nodedataset_indexscoping for simultaneous multi-dataset fits (a no-op for single-dataset / fully-global graphs).