Expand description
Tools for constructing, compiling, and evaluating amplitude-analysis models.
laddu exposes symbolic expressions, event datasets, particle and decay
topology utilities, execution backends, and optional likelihood, fitting,
generation, amplitude, and GPU support through one facade crate. Most
applications can import prelude and enable only the Cargo features they
need.
§Example
use laddu::prelude::*;
let mass = parameter!("mass");
let intensity = (mass.clone() * mass + 1.0).named("intensity");
let model = CompiledModel::from_expr(&intensity)?;
assert_eq!(model.params().len(), 1);Re-exports§
pub use laddu_autodiff as autodiff;pub use laddu_compile as compile;pub use laddu_data as data;pub use laddu_expr as expr;pub use laddu_kernel as kernel;pub use laddu_physics as physics;pub use laddu_runtime as runtime;pub use laddu_generation as generation;pub use laddu_amplitudes as amplitudes;pub use laddu_likelihood as likelihood;pub use laddu_fit as fit;pub use error::*;
Modules§
- error
- A global error type for laddu along with re-exported error types for each crate in the laddu suite.
- params
- Parameter definitions, layouts, registries, and concrete values.
- prelude
- The experiment-neutral public API for building analyses.
Macros§
- parameter
- Convenience macro for creating parameters. Usage:
parameter!("name")for a free parameter, orparameter!("name", 1.0)for a fixed one.
Structs§
- BinSpec
- Validated, monotonically increasing bin edges.
- Dataset
Bin - A lazily filtered dataset corresponding to one bin.
- Device
Identity - Stable information used to match a runtime accelerator to platform telemetry.
- Display
Color - An RGB color used by tree and Graphviz displays.
- Expr
- Shareable symbolic expression represented internally as a directed acyclic graph.
- Expr
Graph - Topologically ordered, serializable representation of an
ExprDAG. - Expr
Graph DotDisplay - Configurable Graphviz DOT display for an
ExprGraph. - Expr
Graph Tree Display - Configurable indented-tree display for an
ExprGraph. - ExprId
- Stable identifier for a node in a serialized
ExprGraph. - Expr
Metadata - User-facing annotations and origin information for an expression node.
- Expr
Shape Error - Describes an operation applied to an expression with an incompatible shape.
- Memory
Decision - One memory-derived execution decision.
- Memory
Plan - Host and optional accelerator budgets for one execution.
- Memory
Pool Report - Report for one resolved pool.
- Memory
Report - Report covering all resources in a
MemoryState. - Memory
Resource - Snapshot of one physical memory resource.
- Memory
State - Live resource discovery and process-wide laddu reservation state.
- Node
Style - Optional foreground, fill, and border colors for a displayed node.
- Node
Style Rule - A selector and the style to overlay on matching nodes.
- Parameter
- Complete definition and user-facing metadata for one scalar parameter.
- Process
Memory Report - Sampled operating-system memory counters for the current process.
Enums§
- Binary
Op - Binary operation in an expression graph.
- Color
Preset - Built-in color palette for expression graphs.
- Comparison
- Comparison operation used by a dataset predicate.
- Expr
Node - Serialized node in a topologically ordered
ExprGraph. - Expr
Node Kind - Node categories available to visualization style selectors.
- Expr
Shape - Structural shape of an expression.
- Expr
Source Kind - Broad origin category recorded in
ExprMetadata. - Interval
Closure - Determines which endpoints are included by an interval predicate.
- Memory
Budget - A requested memory limit.
- Memory
Resource Kind - Kind of physical memory resource.
- Node
Selector - Predicate selecting expression nodes for a
NodeStyleRule. - P4Component
- A named component of a four-momentum in
(E, px, py, pz)order. - Predicate
- Boolean expression used to select events from a dataset.
- Repeated
Subtrees - Controls how graph displays handle nodes reached through multiple paths.
- UnaryOp
- Unary operation in an expression graph.
Traits§
- Component
Index - Converts a component selector into a zero-based index.
- Dataset
Expr Ext - Expression-based query operations for datasets.
Functions§
- acos
- Constructs the principal arccosine of
value. - atan2
- Constructs the two-argument arctangent
atan2(y, x). - cis
- Constructs
cos(phase) + i sin(phase). - complex
- Constructs a complex scalar from real and imaginary expressions.
- dot
- Constructs a vector dot-product expression.
- event_
p4_ component - References one component of a named event four-momentum.
- event_
scalar - References a named scalar column in each event.
- matmul
- Constructs a matrix-matrix multiplication expression.
- matrix
- Constructs a row-major matrix expression from a nested array.
- matrix_
from_ flat - Constructs a row-major matrix from a flat sequence.
- matvec
- Constructs a matrix-vector multiplication expression.
- polar_
complex - Constructs a complex scalar from magnitude and phase expressions.
- solve
- Constructs an expression that solves a linear system.
- vector
- Constructs a vector expression from scalar elements.