Skip to main content

Crate laddu

Crate laddu 

Source
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, or parameter!("name", 1.0) for a fixed one.

Structs§

BinSpec
Validated, monotonically increasing bin edges.
DatasetBin
A lazily filtered dataset corresponding to one bin.
DeviceIdentity
Stable information used to match a runtime accelerator to platform telemetry.
DisplayColor
An RGB color used by tree and Graphviz displays.
Expr
Shareable symbolic expression represented internally as a directed acyclic graph.
ExprGraph
Topologically ordered, serializable representation of an Expr DAG.
ExprGraphDotDisplay
Configurable Graphviz DOT display for an ExprGraph.
ExprGraphTreeDisplay
Configurable indented-tree display for an ExprGraph.
ExprId
Stable identifier for a node in a serialized ExprGraph.
ExprMetadata
User-facing annotations and origin information for an expression node.
ExprShapeError
Describes an operation applied to an expression with an incompatible shape.
MemoryDecision
One memory-derived execution decision.
MemoryPlan
Host and optional accelerator budgets for one execution.
MemoryPoolReport
Report for one resolved pool.
MemoryReport
Report covering all resources in a MemoryState.
MemoryResource
Snapshot of one physical memory resource.
MemoryState
Live resource discovery and process-wide laddu reservation state.
NodeStyle
Optional foreground, fill, and border colors for a displayed node.
NodeStyleRule
A selector and the style to overlay on matching nodes.
Parameter
Complete definition and user-facing metadata for one scalar parameter.
ProcessMemoryReport
Sampled operating-system memory counters for the current process.

Enums§

BinaryOp
Binary operation in an expression graph.
ColorPreset
Built-in color palette for expression graphs.
Comparison
Comparison operation used by a dataset predicate.
ExprNode
Serialized node in a topologically ordered ExprGraph.
ExprNodeKind
Node categories available to visualization style selectors.
ExprShape
Structural shape of an expression.
ExprSourceKind
Broad origin category recorded in ExprMetadata.
IntervalClosure
Determines which endpoints are included by an interval predicate.
MemoryBudget
A requested memory limit.
MemoryResourceKind
Kind of physical memory resource.
NodeSelector
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.
RepeatedSubtrees
Controls how graph displays handle nodes reached through multiple paths.
UnaryOp
Unary operation in an expression graph.

Traits§

ComponentIndex
Converts a component selector into a zero-based index.
DatasetExprExt
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.