numra-core
Foundational traits and types for the Numra workspace — Scalar, Vector, Signal, Uncertain<S>, and the workspace error model.
numra-core defines the numeric vocabulary every other Numra crate shares: a Scalar trait that abstracts over f32 / f64, a Vector trait for state representations, a Signal trait for time-dependent forcings, and an Uncertain<S> primitive that propagates first-order mean / variance through arbitrary scalar pipelines. Optional no-std support for embedded targets.
Example
use Uncertain;
// 1.0 ± 0.1 combined with 2.0 ± 0.2 — means add, variances add
let x = from_std;
let y = from_std;
let sum = x.add;
assert!;
assert!;
What's in this crate
Scalartrait —f32/f64abstraction withfrom_f64,to_f64, common constants, trig / exp / log methodsVectortrait — state-vector backbone for solvers and discretizationsSignaltrait —Harmonic,Chirp,Pulse,Ramp,Step,Tabulatedtime-dependent forcings (plusFromFilewithstd)Uncertain<S>— mean ± std primitive withadd/sub/mul/div/scale/add_constmethodsInterval<S>— interval-arithmetic primitive for worst-case error boundscompute_sensitivities/ParameterSensitivity/ParameterSensitivityResult— finite-difference parameter-sensitivity helper and result typeNumraError/NumraResult/LinalgError— workspace-wide error modelstdfeature (default-on) — disable forno-stdtargets
Composes with
Every crate in the Numra workspace builds on numra-core. The Scalar and Vector traits define the shared numeric vocabulary that lets ODE / SDE / PDE solvers, optimizers, autodiff, and statistics exchange data without conversion or f64 bottlenecks. Signal lets a time-dependent forcing drop into any solver. Uncertain<S> carries first-order uncertainty through arbitrary scalar pipelines.
Install
[]
= "0.1"
Or via the umbrella crate:
[]
= "0.1"
Documentation
- API: https://docs.rs/numra-core
- Book: Architecture overview
- Source: https://github.com/moussaoutlook/numra-rs/tree/main/numra-core
License
Numra Academic & Research License (Non-Commercial). Academic and research use is free; commercial use requires a separate license — contact contact@spectralautomata.com. See LICENSE.