Skip to main content

feynkit_kinematics/
lib.rs

1//! Precision-generic tools for relativistic kinematics.
2//!
3//! This crate owns only language- and application-independent physics types:
4//! three- and four-momenta, spatial rotations, Lorentz boosts, signed momentum
5//! combinations, scoped symbolic scalar products, Mandelstam kinematics,
6//! fixed scalar/vector/spinor external states, initial-state flux and symbolic
7//! two- and three-body phase-space densities,
8//! and generalized-kt jet clustering. Event records, particle
9//! selection, phase-space sampling, and observables belong to callers.
10
11#![forbid(unsafe_code)]
12
13mod clustering;
14mod flux;
15mod helicity;
16mod momentum;
17mod signature;
18mod symbolic;
19mod transform;
20mod wavefunction;
21mod weyl;
22
23pub use clustering::{ClusteringError, ClusteringResult, Jet, JetAlgorithm, JetDefinition};
24pub use flux::InitialStateFlux;
25pub use helicity::{Helicity, HelicityError};
26pub use linnet::num_traits::{Sign, SignError, SignOrZero};
27pub use momentum::{Energy, FourMomentum, ThreeMomentum};
28pub use signature::{MomentumSignature, Signature, SignatureError};
29pub use symbolic::{Kinematics, SymbolicKinematicsError};
30pub use transform::{Axis, Boost, BoostError, Rotation};
31pub use wavefunction::{Wavefunction, WavefunctionError, WavefunctionKind};
32
33use numerica::domains::float::{Real, SingleFloat};
34
35/// Scalar operations required by precision-generic kinematics.
36///
37/// Numerica's real-number traits supply constants from a representative value,
38/// so algorithms do not need to pass through `f64`. The blanket implementation
39/// includes native floats, Numerica multiprecision values, and compatible
40/// downstream precision wrappers.
41pub trait KinematicScalar: Real + SingleFloat + PartialOrd {}
42
43impl<T> KinematicScalar for T where T: Real + SingleFloat + PartialOrd {}