moon-kalman

Production-ready MoonBit state estimation, smoothing, and sensor fusion library

kalman
filter
state-space
sensor-fusion
ekf
ukf
smoothing
moon add Lyllyl789/moon-kalman@0.2.1
Download zip
Author
Version
0.2.1
License
Apache-2.0
Last updated
6 hours ago
Downloads
5
README

#moon-kalman

MoonBit 状态估计、卡尔曼滤波与传感器融合库。

MoonBit check and test

#项目定位

moon-kalman 面向需要在 MoonBit 中构建状态空间模型、处理含噪观测并融合多源传感器数据的应用。它覆盖从矩阵运算和滤波器更新,到数据质量、异常值门控、轨迹后处理和可复现实验的完整链路,适用于导航、机器人、物联网、设备监测和自动控制等场景。

项目以库 API 为中心,核心模块不依赖第三方 MoonBit 模块;仓库同时提供可运行示例和 native release 基准入口。

#核心能力

  • 线性滤波Kalman1DKalmanND,支持预测、控制输入、部分观测、缺失观测、NIS 门控、Joseph 协方差更新、检查点和恢复。
  • 非线性滤波EKFUKF,支持自定义状态转移、雅可比或 sigma 点、门控、缺失观测和诊断统计。
  • 线性代数:向量/矩阵运算、LU 与部分选主元求解、矩阵逆、Cholesky、QR、最小二乘、特征值和条件数估计。
  • 传感器处理:多传感器融合、校准、时间同步、数据质量审计、异常值降权、健康评分、有限缓存和遥测。
  • 估计后处理:RTS 全平滑、固定时滞平滑、信号处理、轨迹分析、误差指标、模型选择、估计器集成和确定性回放。
  • 几何与质量分析:三维坐标/姿态、鲁棒回归、异步传感器对时、批量估计、不确定性预算、轨迹质量、轨迹关联和模型目录。
  • 运行时保护:事件时间窗口、流式游标、状态约束修复、安全包络、诊断快照和 CSV 导出。
  • 输入保护:检查维度、非有限数、退化协方差和缺失数据;公开的数组与矩阵访问器返回副本。

#快速开始

使用 MoonBit stable 工具链,并在你的模块中添加依赖:

moon add Lyllyl789/moon-kalman@0.2.1

moon.pkg 中导入包:

import {
"Lyllyl789/moon-kalman" @kalman,
}

一个最小的标量滤波示例:

fn main {
let filter = @kalman.Kalman1D::new(0.0, 1.0, 0.02, 0.1)
filter.set_gate_threshold(9.210340371976184)
filter.predict_without_control()
let result = filter.update_if_valid(1.0)
println(
"result=\{@kalman.update_result_to_string(result)}, state=\{filter.state()}, variance=\{filter.uncertainty()}",
)
}

#CLI 与可运行入口

本项目当前是库项目,没有独立安装型命令行工具;仓库提供以下可直接运行的 MoonBit executable package:

# 运行两路传感器融合示例 moon run examples/sensor_fusion # 运行 native release 基准 moon run --target native --release benchmarks

#架构

根目录是 Lyllyl789/moon-kalman 公共包,生成的 pkg.generated.mbti 用于记录公开 API。实现按职责划分为以下层次:

  1. 滤波与模型kalman_1d.mbtkalman_nd.mbtekf.mbtukf.mbtmodels.mbtcontrol_models.mbt
  2. 数学基础matrix_types.mbtmatrix_arithmetic.mbtmatrix_decompose.mbtlinear_algebra_extra.mbtvector_math.mbt
  3. 质量与融合fusion.mbtfusion_strategies.mbtcalibration.mbtdata_quality.mbtdiagnostics.mbtquality_control.mbtsensor_runtime.mbttelemetry.mbt
  4. 几何、估计与对时coordinate_frames.mbtrobust_estimation.mbtsensor_alignment.mbtbatch_estimation.mbtuncertainty_analysis.mbt
  5. 运行时与安全track_association.mbtstreaming_runtime.mbtmodel_catalog.mbttrajectory_quality.mbtsafety_constraints.mbtstate_constraints.mbtdiagnostic_export.mbt
  6. 后处理与实验支持smoother.mbtreplay.mbtsignal_processing.mbttrajectory_tools.mbtmetrics.mbtmodel_selection.mbtsimulation.mbt
  7. 可执行包examples/sensor_fusion 提供使用示例,benchmarks 提供确定性的 native release 基准。

当前源码规模快照如下。统计按物理行计数,排除 _build 和生成的 .mbti 文件;测试文件按文件名中的 _test.mbt 区分。

范围文件数行数
根库非测试 MoonBit 源码4619,963
示例与基准入口281
仓库非测试 MoonBit 源码合计4820,044
测试 MoonBit 源码162,418

这些是仓库规模的可复核快照,不代表算法质量或性能保证。

#基准

运行:

moon run --target native --release benchmarks

基准使用确定性输入,并输出 checksum 以便复核。最近一次本地三次运行使用 Windows 11、AMD Ryzen 7 5800H、MoonBit stable 0.1.20260814,结果为:

场景工作量记录耗时记录吞吐
标量更新1,000,000 次14–15 ms66.67–71.43 M updates/s
4×2 矩阵更新10,000 次143–195 ms51.28–69.93 k updates/s

标量 checksum 为 512911.08916493575,矩阵 checksum 为 9850.129406998216。这些是特定机器和工具链下的实测基线,会随硬件、系统负载和 MoonBit 版本变化;完整原始记录见 benchmarks/RESULTS.md

#测试

当前测试套件包含 133 个测试声明,覆盖矩阵边界、奇异和退化协方差、空输入、维度错误、非有限输入、门限拒绝、丢包、回放、运行时健康状态、轨迹、异步对时、鲁棒估计、关联、流式运行时、安全约束和诊断导出。

本地运行完整验证:

moon check --target all --deny-warn moon build --target all --deny-warn moon test --target all --deny-warn

native 覆盖率:

moon test --target native --deny-warn --enable-coverage moon coverage report -f summary

#CI

test.yml 在 Ubuntu、macOS 和 Windows 上安装官方 MoonBit stable 工具链,并执行:

moon version --all moon update moon check --target all --deny-warn moon build --target all --deny-warn moon test --target all --deny-warn moon run examples/sensor_fusion moon fmt && git diff --exit-code moon info && git diff --exit-code

CI 另有 native 覆盖率 job。Mooncakes 发布通过 publish.yml 手动触发,凭据只从 GitHub Actions secret 读取,不写入仓库。

#许可证

本项目采用 Apache License 2.0

#
AdaptiveNoiseController

pub struct AdaptiveNoiseController {
process_scale : Double
measurement_scale : Double
minimum_scale : Double
maximum_scale : Double
target_nis : Double
learning_rate : Double
}

#
AdaptiveNoiseController::measurement_scale

fn AdaptiveNoiseController::measurement_scale(self : AdaptiveNoiseController) -> Double

#
AdaptiveNoiseController::new

fn AdaptiveNoiseController::new(minimum_scale : Double, maximum_scale : Double, target_nis : Double, learning_rate : Double) -> AdaptiveNoiseController

#
AdaptiveNoiseController::observe

fn AdaptiveNoiseController::observe(self : AdaptiveNoiseController, nis : Double) -> Unit

#
AdaptiveNoiseController::process_scale

fn AdaptiveNoiseController::process_scale(self : AdaptiveNoiseController) -> Double

#
AlignedVector

pub struct AlignedVector {
timestamp : Int
values : Array[Double]
status : AlignmentStatus
source_timestamp : Int
quality : Double
distance : Int
} derive(
Debug
)

A value aligned to a requested timestamp.

#
AlignedVector::distance

fn AlignedVector::distance(self : AlignedVector) -> Int

Return absolute source/target distance.

#
AlignedVector::is_present

fn AlignedVector::is_present(self : AlignedVector) -> Bool

Return whether alignment produced a value.

#
AlignedVector::new

fn AlignedVector::new(timestamp : Int, values : Array[Double], status : AlignmentStatus, source_timestamp : Int, quality : Double, distance : Int) -> AlignedVector

Construct an aligned vector.

#
AlignedVector::quality

fn AlignedVector::quality(self : AlignedVector) -> Double

Return propagated quality.

#
AlignedVector::source_timestamp

fn AlignedVector::source_timestamp(self : AlignedVector) -> Int

Return source timestamp.

#
AlignedVector::status

Return status.

#
AlignedVector::timestamp

fn AlignedVector::timestamp(self : AlignedVector) -> Int

Return target timestamp.

#
AlignedVector::values

fn AlignedVector::values(self : AlignedVector) -> Array[Double]

Return aligned values.

#
AlignmentPolicy

pub struct AlignmentPolicy {
tolerance : Int
max_gap : Int
allow_extrapolation : Bool
minimum_quality : Double
} derive(
Debug
)

A policy controlling interpolation and gap handling.

#
AlignmentPolicy::allow_extrapolation

fn AlignmentPolicy::allow_extrapolation(self : AlignmentPolicy) -> Bool

Return extrapolation policy.

#
AlignmentPolicy::max_gap

fn AlignmentPolicy::max_gap(self : AlignmentPolicy) -> Int

Return maximum interpolation gap.

#
AlignmentPolicy::minimum_quality

fn AlignmentPolicy::minimum_quality(self : AlignmentPolicy) -> Double

Return minimum acceptable quality.

#
AlignmentPolicy::new

fn AlignmentPolicy::new(tolerance : Int, max_gap : Int, allow_extrapolation : Bool, minimum_quality : Double) -> AlignmentPolicy

Construct an alignment policy.

#
AlignmentPolicy::tolerance

fn AlignmentPolicy::tolerance(self : AlignmentPolicy) -> Int

Return timestamp tolerance.

#
AlignmentReport

pub struct AlignmentReport {
requested : Int
produced : Int
exact : Int
nearest : Int
interpolated : Int
extrapolated : Int
missing : Int
invalid : Int
maximum_distance : Int
mean_distance : Double
} derive(
Debug
)

A summary of an alignment pass.

#
AlignmentReport::coverage

fn AlignmentReport::coverage(self : AlignmentReport) -> Double

Return the produced fraction.

#
AlignmentReport::exact

fn AlignmentReport::exact(self : AlignmentReport) -> Int

Return exact count.

#
AlignmentReport::extrapolated

fn AlignmentReport::extrapolated(self : AlignmentReport) -> Int

Return extrapolated count.

#
AlignmentReport::interpolated

fn AlignmentReport::interpolated(self : AlignmentReport) -> Int

Return interpolated count.

#
AlignmentReport::invalid

fn AlignmentReport::invalid(self : AlignmentReport) -> Int

Return invalid count.

#
AlignmentReport::maximum_distance

fn AlignmentReport::maximum_distance(self : AlignmentReport) -> Int

Return maximum timestamp distance.

#
AlignmentReport::mean_distance

fn AlignmentReport::mean_distance(self : AlignmentReport) -> Double

Return mean timestamp distance.

#
AlignmentReport::missing

fn AlignmentReport::missing(self : AlignmentReport) -> Int

Return missing count.

#
AlignmentReport::nearest

fn AlignmentReport::nearest(self : AlignmentReport) -> Int

Return nearest count.

#
AlignmentReport::produced

fn AlignmentReport::produced(self : AlignmentReport) -> Int

Return produced count.

#
AlignmentReport::requested

fn AlignmentReport::requested(self : AlignmentReport) -> Int

Return requested count.

#
AlignmentReport::usable_coverage

fn AlignmentReport::usable_coverage(self : AlignmentReport) -> Double

Return the fraction produced by interpolation or exact matching.

#
AlignmentStatus

pub(all) enum AlignmentStatus {
Exact
Nearest
Interpolated
Extrapolated
Missing
Invalid
} derive(Eq,
Debug
)

The outcome class of a timestamp alignment query.

#
AssociationBatch

pub struct AssociationBatch {
decisions : Array[AssociationDecision]
candidates : Array[AssociationCandidate]
unmatched_measurements : Array[Int]
total_cost : Double
accepted_count : Int
} derive(
Debug
)

The result of one batch assignment.

#
AssociationBatch::acceptance_rate

fn AssociationBatch::acceptance_rate(self : AssociationBatch) -> Double

#
AssociationBatch::accepted_count

fn AssociationBatch::accepted_count(self : AssociationBatch) -> Int

#
AssociationBatch::candidates

#
AssociationBatch::decisions

#
AssociationBatch::new

fn AssociationBatch::new(decisions : Array[AssociationDecision], candidates : Array[AssociationCandidate], unmatched_measurements : Array[Int]) -> AssociationBatch

#
AssociationBatch::total_cost

fn AssociationBatch::total_cost(self : AssociationBatch) -> Double

#
AssociationBatch::unmatched_measurements

fn AssociationBatch::unmatched_measurements(self : AssociationBatch) -> Array[Int]

#
AssociationCandidate

pub struct AssociationCandidate {
track_id : Int
measurement_id : Int
distance : Double
likelihood : Double
gated : Bool
metric : String
} derive(
Debug
)

A candidate produced by comparing one predicted track with one measurement.

#
AssociationCandidate::distance

fn AssociationCandidate::distance(self : AssociationCandidate) -> Double

#
AssociationCandidate::gated

fn AssociationCandidate::gated(self : AssociationCandidate) -> Bool

#
AssociationCandidate::likelihood

fn AssociationCandidate::likelihood(self : AssociationCandidate) -> Double

#
AssociationCandidate::measurement_id

fn AssociationCandidate::measurement_id(self : AssociationCandidate) -> Int

#
AssociationCandidate::metric

fn AssociationCandidate::metric(self : AssociationCandidate) -> String

#
AssociationCandidate::new

fn AssociationCandidate::new(track_id : Int, measurement_id : Int, distance : Double, likelihood : Double, gated : Bool, metric : String) -> AssociationCandidate

Construct a candidate and normalize invalid scores.

#
AssociationCandidate::track_id

fn AssociationCandidate::track_id(self : AssociationCandidate) -> Int

#
AssociationConfig

pub struct AssociationConfig {
gate_threshold : Double
minimum_likelihood : Double
miss_cost : Double
allow_reuse : Bool
prefer_likelihood : Bool
} derive(
Debug
)

Gating and assignment policy for a sensor update.

#
AssociationConfig::allow_reuse

fn AssociationConfig::allow_reuse(self : AssociationConfig) -> Bool

#
AssociationConfig::gate_threshold

fn AssociationConfig::gate_threshold(self : AssociationConfig) -> Double

#
AssociationConfig::minimum_likelihood

fn AssociationConfig::minimum_likelihood(self : AssociationConfig) -> Double

#
AssociationConfig::miss_cost

fn AssociationConfig::miss_cost(self : AssociationConfig) -> Double

#
AssociationConfig::new

fn AssociationConfig::new(gate_threshold : Double, minimum_likelihood : Double, miss_cost : Double) -> AssociationConfig

#
AssociationConfig::prefer_likelihood

fn AssociationConfig::prefer_likelihood(self : AssociationConfig) -> Bool

#
AssociationConfig::with_likelihood_priority

fn AssociationConfig::with_likelihood_priority(self : AssociationConfig, enabled : Bool) -> AssociationConfig

#
AssociationConfig::with_reuse

fn AssociationConfig::with_reuse(self : AssociationConfig, enabled : Bool) -> AssociationConfig

#
AssociationDecision

pub struct AssociationDecision {
track_id : Int
measurement_id : Int?
distance : Double
confidence : Double
accepted : Bool
reason : String
} derive(
Debug
)

A decision for a single track after global assignment.

#
AssociationDecision::accepted

fn AssociationDecision::accepted(track_id : Int, measurement_id : Int, distance : Double, confidence : Double, reason : String) -> AssociationDecision

#
AssociationDecision::confidence

fn AssociationDecision::confidence(self : AssociationDecision) -> Double

#
AssociationDecision::distance

fn AssociationDecision::distance(self : AssociationDecision) -> Double

#
AssociationDecision::is_accepted

fn AssociationDecision::is_accepted(self : AssociationDecision) -> Bool

#
AssociationDecision::measurement_id

fn AssociationDecision::measurement_id(self : AssociationDecision) -> Int?

#
AssociationDecision::reason

fn AssociationDecision::reason(self : AssociationDecision) -> String

#
AssociationDecision::track_id

fn AssociationDecision::track_id(self : AssociationDecision) -> Int

#
AssociationDecision::unmatched

fn AssociationDecision::unmatched(track_id : Int, reason : String) -> AssociationDecision

#
BatchFitResult

pub struct BatchFitResult {
coefficients : Array[Double]
covariance : Matrix
residuals : Array[Double]
weights : Array[Double]
rank : Int
rmse : Double
mae : Double
r_squared : Double
condition : Double
iterations : Int
success : Bool
} derive(
Debug
)

A result returned by batch least-squares routines.

#
BatchFitResult::coefficients

fn BatchFitResult::coefficients(self : BatchFitResult) -> Array[Double]

Return fitted coefficients.

#
BatchFitResult::condition

fn BatchFitResult::condition(self : BatchFitResult) -> Double

Return design matrix condition estimate.

#
BatchFitResult::covariance

fn BatchFitResult::covariance(self : BatchFitResult) -> Matrix

Return coefficient covariance.

#
BatchFitResult::iterations

fn BatchFitResult::iterations(self : BatchFitResult) -> Int

Return the number of solver iterations.

#
BatchFitResult::mae

fn BatchFitResult::mae(self : BatchFitResult) -> Double

Return mean absolute error.

#
BatchFitResult::r_squared

fn BatchFitResult::r_squared(self : BatchFitResult) -> Double

Return coefficient of determination.

#
BatchFitResult::rank

fn BatchFitResult::rank(self : BatchFitResult) -> Int

Return matrix rank.

#
BatchFitResult::residuals

fn BatchFitResult::residuals(self : BatchFitResult) -> Array[Double]

Return residuals.

#
BatchFitResult::rmse

fn BatchFitResult::rmse(self : BatchFitResult) -> Double

Return root mean square error.

#
BatchFitResult::success

fn BatchFitResult::success(self : BatchFitResult) -> Bool

Return whether fitting succeeded.

#
BatchFitResult::weights

fn BatchFitResult::weights(self : BatchFitResult) -> Array[Double]

Return final observation weights.

#
BatchGate

pub struct BatchGate {
policy : ResidualPolicy
inspected : Int
accepted : Int
downweighted : Int
rejected : Int
}

A small batch gate that turns individual residual decisions into one packet-level decision and exposes a stable covariance inflation factor.

#
BatchGate::accepted

fn BatchGate::accepted(self : BatchGate) -> Int

#
BatchGate::downweighted

fn BatchGate::downweighted(self : BatchGate) -> Int

#
BatchGate::inflation

fn BatchGate::inflation(self : BatchGate) -> Double

#
BatchGate::inspect

fn BatchGate::inspect(self : BatchGate, residual : Array[Double]) -> ResidualAction

#
BatchGate::inspected

fn BatchGate::inspected(self : BatchGate) -> Int

#
BatchGate::new

fn BatchGate::new(policy : ResidualPolicy) -> BatchGate

#
BatchGate::rejected

fn BatchGate::rejected(self : BatchGate) -> Int

#
BatchGate::reset

fn BatchGate::reset(self : BatchGate) -> Unit

#
BatchObservation

pub struct BatchObservation {
features : Array[Double]
value : Double
weight : Double
timestamp : Int
} derive(
Debug
)

A scalar observation for batch regression. features are copied so a caller can reuse its input buffer after submitting the observation.

#
BatchObservation::features

fn BatchObservation::features(self : BatchObservation) -> Array[Double]

Return the feature vector.

#
BatchObservation::is_valid

fn BatchObservation::is_valid(self : BatchObservation) -> Bool

Return whether the observation is finite and usable.

#
BatchObservation::new

fn BatchObservation::new(features : Array[Double], value : Double, weight : Double, timestamp : Int) -> BatchObservation

Construct a batch observation.

#
BatchObservation::timestamp

fn BatchObservation::timestamp(self : BatchObservation) -> Int

Return observation timestamp.

#
BatchObservation::value

fn BatchObservation::value(self : BatchObservation) -> Double

Return the observed value.

#
BatchObservation::weight

fn BatchObservation::weight(self : BatchObservation) -> Double

Return observation weight.

#
CalibrationTransform

pub struct CalibrationTransform {
offset : Array[Double]
scale : Array[Double]
}

Affine calibration transform applied component-wise to raw readings.

#
CalibrationTransform::apply

fn CalibrationTransform::apply(self : CalibrationTransform, values : Array[Double]) -> Array[Double]

#
CalibrationTransform::dimension

fn CalibrationTransform::dimension(self : CalibrationTransform) -> Int

#
CalibrationTransform::identity

fn CalibrationTransform::identity(dimension : Int) -> CalibrationTransform

#
CalibrationTransform::inverse

fn CalibrationTransform::inverse(self : CalibrationTransform, values : Array[Double]) -> Array[Double]

#
CalibrationTransform::new

fn CalibrationTransform::new(offset : Array[Double], scale : Array[Double]) -> CalibrationTransform

#
CalibrationTransform::offset

fn CalibrationTransform::offset(self : CalibrationTransform) -> Array[Double]

#
CalibrationTransform::scale

fn CalibrationTransform::scale(self : CalibrationTransform) -> Array[Double]

#
ConfidenceBand

pub struct ConfidenceBand {
estimate : Double
lower : Double
upper : Double
standard_deviation : Double
multiplier : Double
valid : Bool
} derive(
Debug
)

A scalar confidence interval with an explicit confidence multiplier.

#
ConfidenceBand::contains

fn ConfidenceBand::contains(self : ConfidenceBand, value : Double) -> Bool

Return whether a value is inside the band.

#
ConfidenceBand::estimate

fn ConfidenceBand::estimate(self : ConfidenceBand) -> Double

Return estimate.

#
ConfidenceBand::lower

fn ConfidenceBand::lower(self : ConfidenceBand) -> Double

Return lower bound.

#
ConfidenceBand::multiplier

fn ConfidenceBand::multiplier(self : ConfidenceBand) -> Double

Return confidence multiplier.

#
ConfidenceBand::new

fn ConfidenceBand::new(estimate : Double, standard_deviation : Double, multiplier : Double) -> ConfidenceBand

Construct a confidence band from an estimate and standard deviation.

#
ConfidenceBand::standard_deviation

fn ConfidenceBand::standard_deviation(self : ConfidenceBand) -> Double

Return standard deviation.

#
ConfidenceBand::upper

fn ConfidenceBand::upper(self : ConfidenceBand) -> Double

Return upper bound.

#
ConfidenceBand::valid

fn ConfidenceBand::valid(self : ConfidenceBand) -> Bool

Return validity.

#
ConfidenceBand::width

fn ConfidenceBand::width(self : ConfidenceBand) -> Double

Return interval width.

#
ConsistencyReport

pub struct ConsistencyReport {
count : Int
average_nees : Double
average_nis : Double
accepted_rate : Double
covariance_failures : Int
} derive(
Debug
)

#
ConsistencyReport::accepted_rate

fn ConsistencyReport::accepted_rate(self : ConsistencyReport) -> Double

#
ConsistencyReport::average_nees

fn ConsistencyReport::average_nees(self : ConsistencyReport) -> Double

#
ConsistencyReport::average_nis

fn ConsistencyReport::average_nis(self : ConsistencyReport) -> Double

#
ConsistencyReport::count

fn ConsistencyReport::count(self : ConsistencyReport) -> Int

#
ConsistencyReport::covariance_failures

fn ConsistencyReport::covariance_failures(self : ConsistencyReport) -> Int

#
ConstantVelocityTracker2D

pub struct ConstantVelocityTracker2D {
filter : KalmanND
acceleration_variance : Double
position_variance : Double
last_timestamp : Int
initialized_timestamp : Bool
}

A ready-to-use two-dimensional position tracker with state [x, y, vx, vy] and a position measurement [x, y].

#
ConstantVelocityTracker2D::covariance

#
ConstantVelocityTracker2D::filter

#
ConstantVelocityTracker2D::new

fn ConstantVelocityTracker2D::new(initial_position : Array[Double], initial_velocity : Array[Double], initial_variance : Double, acceleration_variance : Double, position_variance : Double) -> ConstantVelocityTracker2D

#
ConstantVelocityTracker2D::predict

fn ConstantVelocityTracker2D::predict(self : ConstantVelocityTracker2D, dt : Double) -> Unit

#
ConstantVelocityTracker2D::reset

#
ConstantVelocityTracker2D::set_gate_threshold

fn ConstantVelocityTracker2D::set_gate_threshold(self : ConstantVelocityTracker2D, threshold : Double) -> Unit

#
ConstantVelocityTracker2D::state

#
ConstantVelocityTracker2D::step

fn ConstantVelocityTracker2D::step(self : ConstantVelocityTracker2D, timestamp : Int, position : Array[Double], covariance : Matrix) -> UpdateResult

#
ConstantVelocityTracker2D::step_position

fn ConstantVelocityTracker2D::step_position(self : ConstantVelocityTracker2D, timestamp : Int, x : Double, y : Double) -> UpdateResult

#
ContractIssue

pub struct ContractIssue {
code : String
severity : ContractSeverity
message : String
} derive(
Debug
)

#
ContractIssue::code

fn ContractIssue::code(self : ContractIssue) -> String

#
ContractIssue::message

fn ContractIssue::message(self : ContractIssue) -> String

#
ContractIssue::new

fn ContractIssue::new(code : String, severity : ContractSeverity, message : String) -> ContractIssue

#
ContractIssue::severity

#
ContractSeverity

pub(all) enum ContractSeverity {
Info
Warning
Error
} derive(Eq,
Debug
)

Severity attached to a machine-readable validation issue.

#
ControlCommand

pub struct ControlCommand {
timestamp : Int
values : Array[Double]
duration : Double
} derive(
Debug
)

#
ControlCommand::duration

fn ControlCommand::duration(self : ControlCommand) -> Double

#
ControlCommand::is_valid

fn ControlCommand::is_valid(self : ControlCommand) -> Bool

#
ControlCommand::new

fn ControlCommand::new(timestamp : Int, values : Array[Double], duration : Double) -> ControlCommand

#
ControlCommand::timestamp

fn ControlCommand::timestamp(self : ControlCommand) -> Int

#
ControlCommand::values

fn ControlCommand::values(self : ControlCommand) -> Array[Double]

#
ControlIntegrator

pub struct ControlIntegrator {
dimension : Int
state : Array[Double]
limits : ControlLimits
response : Double
}

Integrate a first-order control response with a bounded acceleration.

#
ControlIntegrator::dimension

fn ControlIntegrator::dimension(self : ControlIntegrator) -> Int

#
ControlIntegrator::new

fn ControlIntegrator::new(dimension : Int, limits : ControlLimits, response : Double) -> ControlIntegrator

#
ControlIntegrator::reset

fn ControlIntegrator::reset(self : ControlIntegrator) -> Unit

#
ControlIntegrator::response

fn ControlIntegrator::response(self : ControlIntegrator) -> Double

#
ControlIntegrator::state

fn ControlIntegrator::state(self : ControlIntegrator) -> Array[Double]

#
ControlIntegrator::step

fn ControlIntegrator::step(self : ControlIntegrator, command : Array[Double], dt : Double) -> Array[Double]

#
ControlLimits

pub struct ControlLimits {
lower : Array[Double]
upper : Array[Double]
}

Saturation limits for an actuator or control input.

#
ControlLimits::apply

fn ControlLimits::apply(self : ControlLimits, command : Array[Double]) -> Array[Double]

#
ControlLimits::contains

fn ControlLimits::contains(self : ControlLimits, command : Array[Double]) -> Bool

#
ControlLimits::dimension

fn ControlLimits::dimension(self : ControlLimits) -> Int

#
ControlLimits::lower

fn ControlLimits::lower(self : ControlLimits) -> Array[Double]

#
ControlLimits::new

fn ControlLimits::new(lower : Array[Double], upper : Array[Double]) -> ControlLimits

#
ControlLimits::upper

fn ControlLimits::upper(self : ControlLimits) -> Array[Double]

#
ControlSequence

pub struct ControlSequence {
commands : Array[ControlCommand]
capacity : Int
rejected : Int
}

A bounded command sequence for offline control replay.

#
ControlSequence::clear

fn ControlSequence::clear(self : ControlSequence) -> Unit

#
ControlSequence::commands

#
ControlSequence::length

fn ControlSequence::length(self : ControlSequence) -> Int

#
ControlSequence::new

fn ControlSequence::new(capacity : Int) -> ControlSequence

#
ControlSequence::push

fn ControlSequence::push(self : ControlSequence, command : ControlCommand) -> Bool

#
ControlSequence::rejected

fn ControlSequence::rejected(self : ControlSequence) -> Int

#
CovarianceAccumulator

pub struct CovarianceAccumulator {
dimension : Int
count : Int
mean : Array[Double]
scatter : Matrix
}

Accumulate covariance from a stream without storing every sample.

#
CovarianceAccumulator::add

fn CovarianceAccumulator::add(self : CovarianceAccumulator, sample : Array[Double]) -> Bool

#
CovarianceAccumulator::count

#
CovarianceAccumulator::covariance

#
CovarianceAccumulator::mean

#
CovarianceAccumulator::new

fn CovarianceAccumulator::new(dimension : Int) -> CovarianceAccumulator

#
CovarianceAccumulator::reset

#
CovarianceHealth

pub enum CovarianceHealth {
Healthy
NonFinite
NotSquare
NotSymmetric
NotPositiveSemidefinite
IllConditioned
} derive(Eq,
Debug
)

#
CovarianceReport

pub struct CovarianceReport {
health : CovarianceHealth
dimension : Int
symmetry_error : Double
minimum_eigenvalue : Double
maximum_eigenvalue : Double
condition_estimate : Double
finite : Bool
positive_diagonal : Bool
} derive(
Debug
)

#
CovarianceReport::condition_estimate

fn CovarianceReport::condition_estimate(self : CovarianceReport) -> Double

#
CovarianceReport::dimension

fn CovarianceReport::dimension(self : CovarianceReport) -> Int

#
CovarianceReport::finite

fn CovarianceReport::finite(self : CovarianceReport) -> Bool

#
CovarianceReport::health

#
CovarianceReport::is_healthy

fn CovarianceReport::is_healthy(self : CovarianceReport) -> Bool

#
CovarianceReport::maximum_eigenvalue

fn CovarianceReport::maximum_eigenvalue(self : CovarianceReport) -> Double

#
CovarianceReport::minimum_eigenvalue

fn CovarianceReport::minimum_eigenvalue(self : CovarianceReport) -> Double

#
CovarianceReport::positive_diagonal

fn CovarianceReport::positive_diagonal(self : CovarianceReport) -> Bool

#
CovarianceReport::symmetry_error

fn CovarianceReport::symmetry_error(self : CovarianceReport) -> Double

#
CovarianceSummary

pub struct CovarianceSummary {
dimension : Int
trace : Double
determinant : Double
minimum_diagonal : Double
maximum_diagonal : Double
condition : Double
rank : Int
symmetric : Bool
positive_diagonal : Bool
finite : Bool
} derive(
Debug
)

A summary of covariance health and scale.

#
CovarianceSummary::condition

fn CovarianceSummary::condition(self : CovarianceSummary) -> Double

Return condition estimate.

#
CovarianceSummary::determinant

fn CovarianceSummary::determinant(self : CovarianceSummary) -> Double

Return determinant.

#
CovarianceSummary::dimension

fn CovarianceSummary::dimension(self : CovarianceSummary) -> Int

Return covariance dimension.

#
CovarianceSummary::finite

fn CovarianceSummary::finite(self : CovarianceSummary) -> Bool

Return finite status.

#
CovarianceSummary::maximum_diagonal

fn CovarianceSummary::maximum_diagonal(self : CovarianceSummary) -> Double

Return maximum diagonal.

#
CovarianceSummary::minimum_diagonal

fn CovarianceSummary::minimum_diagonal(self : CovarianceSummary) -> Double

Return minimum diagonal.

#
CovarianceSummary::positive_diagonal

fn CovarianceSummary::positive_diagonal(self : CovarianceSummary) -> Bool

Return positive-diagonal status.

#
CovarianceSummary::rank

fn CovarianceSummary::rank(self : CovarianceSummary) -> Int

Return numerical rank.

#
CovarianceSummary::symmetric

fn CovarianceSummary::symmetric(self : CovarianceSummary) -> Bool

Return symmetry status.

#
CovarianceSummary::trace

fn CovarianceSummary::trace(self : CovarianceSummary) -> Double

Return trace.

#
CovarianceSummary::usable

fn CovarianceSummary::usable(self : CovarianceSummary, maximum_condition : Double) -> Bool

Return whether covariance is suitable for confidence reporting.

#
DataQualityReport

pub struct DataQualityReport {
total : Int
valid : Int
missing : Int
non_finite : Int
non_monotonic_timestamps : Int
duplicate_timestamps : Int
finite_fraction : Double
} derive(
Debug
)

Data-quality summary for a timestamped sensor stream.

#
DataQualityReport::duplicate_timestamps

fn DataQualityReport::duplicate_timestamps(self : DataQualityReport) -> Int

#
DataQualityReport::finite_fraction

fn DataQualityReport::finite_fraction(self : DataQualityReport) -> Double

#
DataQualityReport::missing

fn DataQualityReport::missing(self : DataQualityReport) -> Int

#
DataQualityReport::non_finite

fn DataQualityReport::non_finite(self : DataQualityReport) -> Int

#
DataQualityReport::non_monotonic_timestamps

fn DataQualityReport::non_monotonic_timestamps(self : DataQualityReport) -> Int

#
DataQualityReport::total

fn DataQualityReport::total(self : DataQualityReport) -> Int

#
DataQualityReport::valid

fn DataQualityReport::valid(self : DataQualityReport) -> Int

#
DeterministicRng

pub struct DeterministicRng {
state : Int
}

Small deterministic pseudo-random generator for repeatable examples and benchmarks. It is not intended for cryptographic use.

#
DeterministicRng::bounded_int

fn DeterministicRng::bounded_int(self : DeterministicRng, bound : Int) -> Int

#
DeterministicRng::new

fn DeterministicRng::new(seed : Int) -> DeterministicRng

#
DeterministicRng::next

fn DeterministicRng::next(self : DeterministicRng) -> Int

#
DeterministicRng::symmetric

fn DeterministicRng::symmetric(self : DeterministicRng, amplitude : Double) -> Double

#
DeterministicRng::unit

fn DeterministicRng::unit(self : DeterministicRng) -> Double

#
DiagnosticAccumulator

pub struct DiagnosticAccumulator {
reports : Array[DiagnosticReport]
capacity : Int
discarded : Int
} derive(
Debug
)

#
DiagnosticAccumulator::average_score

fn DiagnosticAccumulator::average_score(self : DiagnosticAccumulator) -> Double

#
DiagnosticAccumulator::discarded

fn DiagnosticAccumulator::discarded(self : DiagnosticAccumulator) -> Int

#
DiagnosticAccumulator::healthy_fraction

fn DiagnosticAccumulator::healthy_fraction(self : DiagnosticAccumulator) -> Double

#
DiagnosticAccumulator::length

#
DiagnosticAccumulator::new

fn DiagnosticAccumulator::new(capacity : Int) -> DiagnosticAccumulator

#
DiagnosticAccumulator::push

#
DiagnosticAccumulator::reports

#
DiagnosticEvent

pub struct DiagnosticEvent {
timestamp : Int
code : String
severity : DiagnosticSeverity
message : String
value : Double
acknowledged : Bool
} derive(
Debug
)

#
DiagnosticEvent::acknowledge

fn DiagnosticEvent::acknowledge(self : DiagnosticEvent) -> Unit

#
DiagnosticEvent::acknowledged

fn DiagnosticEvent::acknowledged(self : DiagnosticEvent) -> Bool

#
DiagnosticEvent::code

fn DiagnosticEvent::code(self : DiagnosticEvent) -> String

#
DiagnosticEvent::csv

fn DiagnosticEvent::csv(self : DiagnosticEvent) -> String

#
DiagnosticEvent::message

fn DiagnosticEvent::message(self : DiagnosticEvent) -> String

#
DiagnosticEvent::new

fn DiagnosticEvent::new(timestamp : Int, code : String, severity : DiagnosticSeverity, message : String, value : Double) -> DiagnosticEvent

#
DiagnosticEvent::severity

#
DiagnosticEvent::severity_text

fn DiagnosticEvent::severity_text(self : DiagnosticEvent) -> String

#
DiagnosticEvent::timestamp

fn DiagnosticEvent::timestamp(self : DiagnosticEvent) -> Int

#
DiagnosticEvent::value

fn DiagnosticEvent::value(self : DiagnosticEvent) -> Double

#
DiagnosticField

pub struct DiagnosticField {
name : String
value : Double
unit : String
category : String
healthy : Bool
} derive(
Debug
)

A named diagnostic value suitable for logs, dashboards and CSV export.

#
DiagnosticField::category

fn DiagnosticField::category(self : DiagnosticField) -> String

#
DiagnosticField::csv

fn DiagnosticField::csv(self : DiagnosticField) -> String

#
DiagnosticField::healthy

fn DiagnosticField::healthy(self : DiagnosticField) -> Bool

#
DiagnosticField::name

fn DiagnosticField::name(self : DiagnosticField) -> String

#
DiagnosticField::new

fn DiagnosticField::new(name : String, value : Double, unit : String, category : String, healthy : Bool) -> DiagnosticField

#
DiagnosticField::unit

fn DiagnosticField::unit(self : DiagnosticField) -> String

#
DiagnosticField::value

fn DiagnosticField::value(self : DiagnosticField) -> Double

#
DiagnosticReport

pub struct DiagnosticReport {
run_id : String
started_at : Int
finished_at : Int?
snapshots : Array[DiagnosticSnapshot]
events : Array[DiagnosticEvent]
closed : Bool
} derive(
Debug
)

#
DiagnosticReport::add_event

fn DiagnosticReport::add_event(self : DiagnosticReport, event : DiagnosticEvent) -> Bool

#
DiagnosticReport::add_snapshot

fn DiagnosticReport::add_snapshot(self : DiagnosticReport, snapshot : DiagnosticSnapshot) -> Bool

#
DiagnosticReport::close

fn DiagnosticReport::close(self : DiagnosticReport, timestamp : Int) -> Unit

#
DiagnosticReport::closed

fn DiagnosticReport::closed(self : DiagnosticReport) -> Bool

#
DiagnosticReport::duration

fn DiagnosticReport::duration(self : DiagnosticReport) -> Int

#
DiagnosticReport::events

#
DiagnosticReport::events_csv

fn DiagnosticReport::events_csv(self : DiagnosticReport) -> String

#
DiagnosticReport::finished_at

fn DiagnosticReport::finished_at(self : DiagnosticReport) -> Int?

#
DiagnosticReport::healthy

fn DiagnosticReport::healthy(self : DiagnosticReport) -> Bool

#
DiagnosticReport::new

fn DiagnosticReport::new(run_id : String, started_at : Int) -> DiagnosticReport

#
DiagnosticReport::run_id

fn DiagnosticReport::run_id(self : DiagnosticReport) -> String

#
DiagnosticReport::score

fn DiagnosticReport::score(self : DiagnosticReport) -> Double

#
DiagnosticReport::snapshots

#
DiagnosticReport::snapshots_csv

fn DiagnosticReport::snapshots_csv(self : DiagnosticReport) -> String

#
DiagnosticReport::started_at

fn DiagnosticReport::started_at(self : DiagnosticReport) -> Int

#
DiagnosticReport::summary

fn DiagnosticReport::summary(self : DiagnosticReport) -> String

#
DiagnosticSeverity

pub(all) enum DiagnosticSeverity {
Info
Warning
Error
Critical
} derive(Eq,
Debug
)

#
DiagnosticSnapshot

pub struct DiagnosticSnapshot {
timestamp : Int
source : String
fields : Array[DiagnosticField]
state_dimension : Int
covariance_dimension : Int
healthy : Bool
score : Double
} derive(
Debug
)

#
DiagnosticSnapshot::covariance_dimension

fn DiagnosticSnapshot::covariance_dimension(self : DiagnosticSnapshot) -> Int

#
DiagnosticSnapshot::csv_header

fn DiagnosticSnapshot::csv_header(self : DiagnosticSnapshot) -> String

#
DiagnosticSnapshot::csv_row

fn DiagnosticSnapshot::csv_row(self : DiagnosticSnapshot) -> String

#
DiagnosticSnapshot::field

fn DiagnosticSnapshot::field(self : DiagnosticSnapshot, name : String) -> DiagnosticField?

#
DiagnosticSnapshot::fields

#
DiagnosticSnapshot::healthy

fn DiagnosticSnapshot::healthy(self : DiagnosticSnapshot) -> Bool

#
DiagnosticSnapshot::new

fn DiagnosticSnapshot::new(timestamp : Int, source : String, fields : Array[DiagnosticField], state_dimension : Int, covariance_dimension : Int) -> DiagnosticSnapshot

#
DiagnosticSnapshot::score

fn DiagnosticSnapshot::score(self : DiagnosticSnapshot) -> Double

#
DiagnosticSnapshot::source

fn DiagnosticSnapshot::source(self : DiagnosticSnapshot) -> String

#
DiagnosticSnapshot::state_dimension

fn DiagnosticSnapshot::state_dimension(self : DiagnosticSnapshot) -> Int

#
DiagnosticSnapshot::timestamp

fn DiagnosticSnapshot::timestamp(self : DiagnosticSnapshot) -> Int

#
DominantEigenpair

pub struct DominantEigenpair {
value : Double
vector : Array[Double]
iterations : Int
converged : Bool
} derive(
Debug
)

One power-iteration estimate of the dominant eigenpair.

#
DominantEigenpair::converged

fn DominantEigenpair::converged(self : DominantEigenpair) -> Bool

#
DominantEigenpair::iterations

fn DominantEigenpair::iterations(self : DominantEigenpair) -> Int

#
DominantEigenpair::value

fn DominantEigenpair::value(self : DominantEigenpair) -> Double

#
DominantEigenpair::vector

fn DominantEigenpair::vector(self : DominantEigenpair) -> Array[Double]

#
EKF

pub struct EKF {
x : Array[Double]
p : Matrix
q : Matrix
r : Matrix
initial_state : Array[Double]
initial_covariance : Matrix
last_innovation : Array[Double]
last_innovation_covariance : Matrix
last_gain : Matrix
last_nis : Double
gate_threshold : Double
predict_count : Int
accepted_count : Int
rejected_count : Int
missing_count : Int
}

Extended Kalman Filter for differentiable non-linear models.

Callers provide the state transition and observation functions together with their Jacobians. All covariance updates use the same numerically stable Joseph form as KalmanND.

#
EKF::accepted_count

fn EKF::accepted_count(self : EKF) -> Int

#
EKF::covariance

fn EKF::covariance(self : EKF) -> Matrix

#
EKF::filter

fn EKF::filter(self : EKF, measurements : Array[Array[Double]], f : (Array[Double]) -> Array[Double], jacobian_f : (Array[Double]) -> Array[Array[Double]], h : (Array[Double]) -> Array[Double], jacobian_h : (Array[Double]) -> Array[Array[Double]]) -> Array[Array[Double]]

Run a sequence of EKF updates against a caller-owned model.

#
EKF::gate_threshold

fn EKF::gate_threshold(self : EKF) -> Double

#
EKF::innovation

fn EKF::innovation(self : EKF) -> Array[Double]

#
EKF::innovation_covariance

fn EKF::innovation_covariance(self : EKF) -> Matrix

#
EKF::kalman_gain

fn EKF::kalman_gain(self : EKF) -> Matrix

#
EKF::measurement_noise

fn EKF::measurement_noise(self : EKF) -> Matrix

#
EKF::missing_count

fn EKF::missing_count(self : EKF) -> Int

#
EKF::new

fn EKF::new(initial_state : Array[Double], initial_covariance : Array[Array[Double]], process_noise : Array[Array[Double]], measurement_noise : Array[Array[Double]]) -> EKF

#
EKF::normalized_innovation_squared

fn EKF::normalized_innovation_squared(self : EKF) -> Double

#
EKF::predict

fn EKF::predict(self : EKF, f : (Array[Double]) -> Array[Double], jacobian_f : (Array[Double]) -> Array[Array[Double]]) -> Unit

#
EKF::predict_count

fn EKF::predict_count(self : EKF) -> Int

#
EKF::predict_with_control

fn EKF::predict_with_control(self : EKF, f : (Array[Double], Array[Double]) -> Array[Double], jacobian_f : (Array[Double], Array[Double]) -> Array[Array[Double]], control : Array[Double]) -> Unit

#
EKF::process_noise

fn EKF::process_noise(self : EKF) -> Matrix

#
EKF::rejected_count

fn EKF::rejected_count(self : EKF) -> Int

#
EKF::reset

fn EKF::reset(self : EKF) -> Unit

#
EKF::set_gate_threshold

fn EKF::set_gate_threshold(self : EKF, threshold : Double) -> Unit

#
EKF::set_measurement_noise

fn EKF::set_measurement_noise(self : EKF, measurement_noise : Matrix) -> Bool

#
EKF::set_process_noise

fn EKF::set_process_noise(self : EKF, process_noise : Matrix) -> Bool

#
EKF::state

fn EKF::state(self : EKF) -> Array[Double]

#
EKF::update

fn EKF::update(self : EKF, z : Array[Double], h : (Array[Double]) -> Array[Double], jacobian_h : (Array[Double]) -> Array[Array[Double]]) -> UpdateResult

#
EKF::update_gated

fn EKF::update_gated(self : EKF, z : Array[Double], h : (Array[Double]) -> Array[Double], jacobian_h : (Array[Double]) -> Array[Array[Double]], threshold : Double) -> UpdateResult

#
EKF::update_missing

fn EKF::update_missing(self : EKF) -> UpdateResult

#
ErrorMetrics

pub(all) struct ErrorMetrics {
count : Int
rmse : Double
mae : Double
max_error : Double
final_error : Double
} derive(
Debug
)

Common quality metrics for state-estimation experiments.

#
ErrorMetrics::count

fn ErrorMetrics::count(self : ErrorMetrics) -> Int

#
ErrorMetrics::final_error

fn ErrorMetrics::final_error(self : ErrorMetrics) -> Double

#
ErrorMetrics::mae

fn ErrorMetrics::mae(self : ErrorMetrics) -> Double

#
ErrorMetrics::max_error

fn ErrorMetrics::max_error(self : ErrorMetrics) -> Double

#
ErrorMetrics::rmse

fn ErrorMetrics::rmse(self : ErrorMetrics) -> Double

#
Estimate1D

pub struct Estimate1D {
value : Double
variance : Double
} derive(
Debug
)

A one-dimensional estimate and its uncertainty.

#
Estimate1D::value

fn Estimate1D::value(self : Estimate1D) -> Double

#
Estimate1D::variance

fn Estimate1D::variance(self : Estimate1D) -> Double

#
EstimatorEnsemble

pub struct EstimatorEnsemble {
dimension : Int
candidates : Array[StateCandidate]
rejected : Int
}

Weighted consensus over a set of independent state estimates.

#
EstimatorEnsemble::add

fn EstimatorEnsemble::add(self : EstimatorEnsemble, candidate : StateCandidate) -> Bool

#
EstimatorEnsemble::best

#
EstimatorEnsemble::candidates

#
EstimatorEnsemble::clear

fn EstimatorEnsemble::clear(self : EstimatorEnsemble) -> Unit

#
EstimatorEnsemble::consensus

fn EstimatorEnsemble::consensus(self : EstimatorEnsemble) -> Array[Double]

#
EstimatorEnsemble::consensus_covariance

fn EstimatorEnsemble::consensus_covariance(self : EstimatorEnsemble) -> Matrix

#
EstimatorEnsemble::dimension

fn EstimatorEnsemble::dimension(self : EstimatorEnsemble) -> Int

#
EstimatorEnsemble::disagreement

fn EstimatorEnsemble::disagreement(self : EstimatorEnsemble) -> Double

#
EstimatorEnsemble::length

fn EstimatorEnsemble::length(self : EstimatorEnsemble) -> Int

#
EstimatorEnsemble::new

fn EstimatorEnsemble::new(dimension : Int) -> EstimatorEnsemble

#
EstimatorEnsemble::rejected

fn EstimatorEnsemble::rejected(self : EstimatorEnsemble) -> Int

#
ExponentialStats

pub struct ExponentialStats {
alpha : Double
count : Int
mean : Double
variance : Double
minimum : Double
maximum : Double
}

Exponentially weighted scalar statistics for non-stationary sensors.

#
ExponentialStats::add

fn ExponentialStats::add(self : ExponentialStats, value : Double) -> Bool

#
ExponentialStats::alpha

fn ExponentialStats::alpha(self : ExponentialStats) -> Double

#
ExponentialStats::count

fn ExponentialStats::count(self : ExponentialStats) -> Int

#
ExponentialStats::maximum

fn ExponentialStats::maximum(self : ExponentialStats) -> Double

#
ExponentialStats::mean

fn ExponentialStats::mean(self : ExponentialStats) -> Double

#
ExponentialStats::minimum

fn ExponentialStats::minimum(self : ExponentialStats) -> Double

#
ExponentialStats::new

fn ExponentialStats::new(alpha : Double) -> ExponentialStats

#
ExponentialStats::reset

fn ExponentialStats::reset(self : ExponentialStats) -> Unit

#
ExponentialStats::standard_deviation

fn ExponentialStats::standard_deviation(self : ExponentialStats) -> Double

#
ExponentialStats::variance

fn ExponentialStats::variance(self : ExponentialStats) -> Double

#
FeatureVector

pub struct FeatureVector {
mean : Double
variance : Double
slope : Double
minimum : Double
maximum : Double
energy : Double
} derive(
Debug
)

#
FeatureVector::energy

fn FeatureVector::energy(self : FeatureVector) -> Double

#
FeatureVector::maximum

fn FeatureVector::maximum(self : FeatureVector) -> Double

#
FeatureVector::mean

fn FeatureVector::mean(self : FeatureVector) -> Double

#
FeatureVector::minimum

fn FeatureVector::minimum(self : FeatureVector) -> Double

#
FeatureVector::slope

fn FeatureVector::slope(self : FeatureVector) -> Double

#
FeatureVector::variance

fn FeatureVector::variance(self : FeatureVector) -> Double

#
FilterCheckpoint

pub struct FilterCheckpoint {
state : Array[Double]
covariance : Matrix
timestamp : Int
} derive(
Debug
)

A serializable-in-memory checkpoint for crash recovery and replay.

#
FilterCheckpoint::covariance

fn FilterCheckpoint::covariance(self : FilterCheckpoint) -> Matrix

#
FilterCheckpoint::new

fn FilterCheckpoint::new(state : Array[Double], covariance : Matrix, timestamp : Int) -> FilterCheckpoint

#
FilterCheckpoint::state

fn FilterCheckpoint::state(self : FilterCheckpoint) -> Array[Double]

#
FilterCheckpoint::timestamp

fn FilterCheckpoint::timestamp(self : FilterCheckpoint) -> Int

#
FilterStatus

pub(all) enum FilterStatus {
WarmingUp
Healthy
Degraded
Faulted
} derive(Eq,
Debug
)

Runtime health classification for an on-device filter.

#
FixedLagSmoother

pub struct FixedLagSmoother {
lag : Int
states : Array[Array[Double]]
covariances : Array[Matrix]
predicted_states : Array[Array[Double]]
predicted_covariances : Array[Matrix]
transitions : Array[Matrix]
}

Fixed-lag history manager. It stores the data needed to smooth a bounded recent window while returning the newest filtered estimate immediately.

#
FixedLagSmoother::lag

fn FixedLagSmoother::lag(self : FixedLagSmoother) -> Int

#
FixedLagSmoother::latest_smoothed_state

fn FixedLagSmoother::latest_smoothed_state(self : FixedLagSmoother) -> Array[Double]

#
FixedLagSmoother::length

fn FixedLagSmoother::length(self : FixedLagSmoother) -> Int

#
FixedLagSmoother::new

fn FixedLagSmoother::new(lag : Int) -> FixedLagSmoother

#
FixedLagSmoother::push

fn FixedLagSmoother::push(self : FixedLagSmoother, filtered_state : Array[Double], filtered_covariance : Matrix, predicted_state : Array[Double], predicted_covariance : Matrix, transition : Matrix) -> Unit

#
FixedLagSmoother::smooth

#
FusionEvent

pub struct FusionEvent {
timestamp : Int
sensor : String
result : UpdateResult
state : Array[Double]
covariance : Matrix
nis : Double
} derive(
Debug
)

#
FusionEvent::covariance

fn FusionEvent::covariance(self : FusionEvent) -> Matrix

#
FusionEvent::nis

fn FusionEvent::nis(self : FusionEvent) -> Double

#
FusionEvent::result

fn FusionEvent::result(self : FusionEvent) -> UpdateResult

#
FusionEvent::sensor

fn FusionEvent::sensor(self : FusionEvent) -> String

#
FusionEvent::state

fn FusionEvent::state(self : FusionEvent) -> Array[Double]

#
FusionEvent::timestamp

fn FusionEvent::timestamp(self : FusionEvent) -> Int

#
FusionMeasurement

pub struct FusionMeasurement {
sensor : String
timestamp : Int
values : Array[Double]
covariance : Matrix
confidence : Double
} derive(
Debug
)

#
FusionMeasurement::confidence

fn FusionMeasurement::confidence(self : FusionMeasurement) -> Double

#
FusionMeasurement::covariance

fn FusionMeasurement::covariance(self : FusionMeasurement) -> Matrix

#
FusionMeasurement::is_valid

fn FusionMeasurement::is_valid(self : FusionMeasurement, dimension : Int) -> Bool

#
FusionMeasurement::new

fn FusionMeasurement::new(sensor : String, timestamp : Int, values : Array[Double], covariance : Matrix, confidence : Double) -> FusionMeasurement

#
FusionMeasurement::sensor

fn FusionMeasurement::sensor(self : FusionMeasurement) -> String

#
FusionMeasurement::timestamp

fn FusionMeasurement::timestamp(self : FusionMeasurement) -> Int

#
FusionMeasurement::values

fn FusionMeasurement::values(self : FusionMeasurement) -> Array[Double]

#
FusionPolicy

pub struct FusionPolicy {
gate_threshold : Double
max_time_gap : Int
covariance_inflation : Double
reject_non_finite : Bool
predict_on_missing : Bool
} derive(
Debug
)

Policy for multi-sensor fusion and outlier handling.

#
FusionPolicy::covariance_inflation

fn FusionPolicy::covariance_inflation(self : FusionPolicy) -> Double

#
FusionPolicy::default

fn FusionPolicy::default() -> FusionPolicy

#
FusionPolicy::gate_threshold

fn FusionPolicy::gate_threshold(self : FusionPolicy) -> Double

#
FusionPolicy::max_time_gap

fn FusionPolicy::max_time_gap(self : FusionPolicy) -> Int

#
FusionPolicy::new

fn FusionPolicy::new(gate_threshold : Double, max_time_gap : Int, covariance_inflation : Double, reject_non_finite : Bool, predict_on_missing : Bool) -> FusionPolicy

#
FusionPolicy::predict_on_missing

fn FusionPolicy::predict_on_missing(self : FusionPolicy) -> Bool

#
FusionPolicy::reject_non_finite

fn FusionPolicy::reject_non_finite(self : FusionPolicy) -> Bool

#
FusionResult

pub struct FusionResult {
strategy : FusionStrategy
timestamp : Int
values : Array[Double]
covariance : Matrix
used : Int
rejected : Int
} derive(
Debug
)

#
FusionResult::covariance

fn FusionResult::covariance(self : FusionResult) -> Matrix

#
FusionResult::rejected

fn FusionResult::rejected(self : FusionResult) -> Int

#
FusionResult::strategy

fn FusionResult::strategy(self : FusionResult) -> FusionStrategy

#
FusionResult::timestamp

fn FusionResult::timestamp(self : FusionResult) -> Int

#
FusionResult::used

fn FusionResult::used(self : FusionResult) -> Int

#
FusionResult::values

fn FusionResult::values(self : FusionResult) -> Array[Double]

#
FusionStatistics

pub struct FusionStatistics {
total_packets : Int
accepted_packets : Int
rejected_packets : Int
missing_packets : Int
last_timestamp : Int
} derive(
Debug
)

#
FusionStatistics::accepted_packets

fn FusionStatistics::accepted_packets(self : FusionStatistics) -> Int

#
FusionStatistics::last_timestamp

fn FusionStatistics::last_timestamp(self : FusionStatistics) -> Int

#
FusionStatistics::missing_packets

fn FusionStatistics::missing_packets(self : FusionStatistics) -> Int

#
FusionStatistics::rejected_packets

fn FusionStatistics::rejected_packets(self : FusionStatistics) -> Int

#
FusionStatistics::total_packets

fn FusionStatistics::total_packets(self : FusionStatistics) -> Int

#
FusionStrategy

pub(all) enum FusionStrategy {
WeightedMean
Median
BestConfidence
TrimmedMean(Int)
} derive(Eq,
Debug
)

How independent measurements are combined before the state update.

#
GateSchedule

pub struct GateSchedule {
base_threshold : Double
minimum_threshold : Double
maximum_threshold : Double
consecutive_rejections : Int
recovery_steps : Int
}

#
GateSchedule::consecutive_rejections

fn GateSchedule::consecutive_rejections(self : GateSchedule) -> Int

#
GateSchedule::new

fn GateSchedule::new(base_threshold : Double, minimum_threshold : Double, maximum_threshold : Double, recovery_steps : Int) -> GateSchedule

#
GateSchedule::observe

fn GateSchedule::observe(self : GateSchedule, result : UpdateResult) -> Double

#
GateSchedule::threshold

fn GateSchedule::threshold(self : GateSchedule) -> Double

#
Histogram

pub struct Histogram {
minimum : Double
maximum : Double
buckets : Array[HistogramBucket]
underflow : Int
overflow : Int
samples : Int
}

#
Histogram::add

fn Histogram::add(self : Histogram, value : Double) -> Bool

#
Histogram::add_many

fn Histogram::add_many(self : Histogram, values : Array[Double]) -> Int

#
Histogram::bucket_count

fn Histogram::bucket_count(self : Histogram) -> Int

#
Histogram::buckets

fn Histogram::buckets(self : Histogram) -> Array[HistogramBucket]

#
Histogram::density

fn Histogram::density(self : Histogram) -> Array[Double]

#
Histogram::in_range

fn Histogram::in_range(self : Histogram) -> Int

#
Histogram::maximum

fn Histogram::maximum(self : Histogram) -> Double

#
Histogram::minimum

fn Histogram::minimum(self : Histogram) -> Double

#
Histogram::new

fn Histogram::new(minimum : Double, maximum : Double, bucket_count : Int) -> Histogram

#
Histogram::overflow

fn Histogram::overflow(self : Histogram) -> Int

#
Histogram::percentile

fn Histogram::percentile(self : Histogram, probability : Double) -> Double

#
Histogram::reset

fn Histogram::reset(self : Histogram) -> Unit

#
Histogram::samples

fn Histogram::samples(self : Histogram) -> Int

#
Histogram::underflow

fn Histogram::underflow(self : Histogram) -> Int

#
HistogramBucket

pub struct HistogramBucket {
lower : Double
upper : Double
count : Int
} derive(
Debug
)

A fixed-width histogram for telemetry and residual distributions.

#
HistogramBucket::count

fn HistogramBucket::count(self : HistogramBucket) -> Int

#
HistogramBucket::lower

fn HistogramBucket::lower(self : HistogramBucket) -> Double

#
HistogramBucket::upper

fn HistogramBucket::upper(self : HistogramBucket) -> Double

#
InnovationDiagnostics

pub struct InnovationDiagnostics {
innovation : Array[Double]
covariance : Matrix
nis : Double
whitened_norm : Double
accepted : Bool
} derive(
Debug
)

#
InnovationDiagnostics::accepted

fn InnovationDiagnostics::accepted(self : InnovationDiagnostics) -> Bool

#
InnovationDiagnostics::covariance

#
InnovationDiagnostics::innovation

fn InnovationDiagnostics::innovation(self : InnovationDiagnostics) -> Array[Double]

#
InnovationDiagnostics::nis

#
InnovationDiagnostics::whitened_norm

fn InnovationDiagnostics::whitened_norm(self : InnovationDiagnostics) -> Double

#
InnovationMonitor

pub struct InnovationMonitor {
dimension : Int
threshold : Double
samples : Int
accepted : Int
rejected : Int
nis_stats : RunningStats
last_nis : Double
}

Online innovation monitor used as a quality gate and alert source.

#
InnovationMonitor::acceptance_rate

fn InnovationMonitor::acceptance_rate(self : InnovationMonitor) -> Double

#
InnovationMonitor::accepted

fn InnovationMonitor::accepted(self : InnovationMonitor) -> Int

#
InnovationMonitor::average_nis

fn InnovationMonitor::average_nis(self : InnovationMonitor) -> Double

#
InnovationMonitor::last_nis

fn InnovationMonitor::last_nis(self : InnovationMonitor) -> Double

#
InnovationMonitor::new

fn InnovationMonitor::new(dimension : Int, threshold : Double) -> InnovationMonitor

#
InnovationMonitor::observe

fn InnovationMonitor::observe(self : InnovationMonitor, innovation : Array[Double], covariance : Matrix) -> Bool

#
InnovationMonitor::rejected

fn InnovationMonitor::rejected(self : InnovationMonitor) -> Int

#
InnovationMonitor::samples

fn InnovationMonitor::samples(self : InnovationMonitor) -> Int

#
Kalman1D

pub struct Kalman1D {
x : Double
p : Double
q : Double
r : Double
initial_state : Double
initial_uncertainty : Double
last_innovation : Double
last_innovation_variance : Double
last_gain : Double
last_nis : Double
gate_threshold : Double
predict_count : Int
accepted_count : Int
rejected_count : Int
missing_count : Int
}

A production-ready scalar Kalman filter for cheap sensor smoothing.

#
Kalman1D::accepted_count

fn Kalman1D::accepted_count(self : Kalman1D) -> Int

#
Kalman1D::adapt_process_noise

fn Kalman1D::adapt_process_noise(self : Kalman1D, lower : Double, upper : Double) -> Unit

Adapt process noise using the latest innovation while bounding changes.

#
Kalman1D::estimate

fn Kalman1D::estimate(self : Kalman1D) -> Estimate1D

#
Kalman1D::filter

fn Kalman1D::filter(self : Kalman1D, measurements : Array[Double], control? : Array[Double]) -> Array[Double]

Smooth a whole scalar measurement series and return the state history.

#
Kalman1D::gate_threshold

fn Kalman1D::gate_threshold(self : Kalman1D) -> Double

#
Kalman1D::innovation

fn Kalman1D::innovation(self : Kalman1D) -> Double

#
Kalman1D::innovation_variance

fn Kalman1D::innovation_variance(self : Kalman1D) -> Double

#
Kalman1D::kalman_gain

fn Kalman1D::kalman_gain(self : Kalman1D) -> Double

#
Kalman1D::measurement_noise

fn Kalman1D::measurement_noise(self : Kalman1D) -> Double

#
Kalman1D::missing_count

fn Kalman1D::missing_count(self : Kalman1D) -> Int

#
Kalman1D::new

fn Kalman1D::new(initial_state : Double, initial_uncertainty : Double, process_noise : Double, measurement_noise : Double) -> Kalman1D

#
Kalman1D::normalized_innovation_squared

fn Kalman1D::normalized_innovation_squared(self : Kalman1D) -> Double

#
Kalman1D::predict

fn Kalman1D::predict(self : Kalman1D, u : Double) -> Unit

#
Kalman1D::predict_count

fn Kalman1D::predict_count(self : Kalman1D) -> Int

#
Kalman1D::predict_without_control

fn Kalman1D::predict_without_control(self : Kalman1D) -> Unit

#
Kalman1D::process_noise

fn Kalman1D::process_noise(self : Kalman1D) -> Double

#
Kalman1D::rejected_count

fn Kalman1D::rejected_count(self : Kalman1D) -> Int

#
Kalman1D::reset

fn Kalman1D::reset(self : Kalman1D) -> Unit

#
Kalman1D::set_gate_threshold

fn Kalman1D::set_gate_threshold(self : Kalman1D, threshold : Double) -> Unit

#
Kalman1D::set_measurement_noise

fn Kalman1D::set_measurement_noise(self : Kalman1D, measurement_noise : Double) -> Unit

#
Kalman1D::set_process_noise

fn Kalman1D::set_process_noise(self : Kalman1D, process_noise : Double) -> Unit

#
Kalman1D::state

fn Kalman1D::state(self : Kalman1D) -> Double

#
Kalman1D::uncertainty

fn Kalman1D::uncertainty(self : Kalman1D) -> Double

#
Kalman1D::update

fn Kalman1D::update(self : Kalman1D, z : Double) -> Unit

#
Kalman1D::update_gated

fn Kalman1D::update_gated(self : Kalman1D, z : Double, threshold : Double) -> UpdateResult

#
Kalman1D::update_if_valid

fn Kalman1D::update_if_valid(self : Kalman1D, z : Double) -> UpdateResult

#
Kalman1D::update_missing

fn Kalman1D::update_missing(self : Kalman1D) -> UpdateResult

#
KalmanDiagnostics

pub enum KalmanDiagnostics {
Token
} derive(Eq,
Debug
)

Namespace object for covariance and observation diagnostics.

#
KalmanDiagnostics::check_covariance

fn KalmanDiagnostics::check_covariance(self : KalmanDiagnostics, covariance : Array[Array[Double]]) -> Bool

Compatibility helper for the original API.

#
KalmanDiagnostics::new

#
KalmanDiagnostics::report

fn KalmanDiagnostics::report(self : KalmanDiagnostics, covariance : Matrix) -> CovarianceReport

Inspect symmetry, finite values, diagonal signs, approximate eigenvalues, and conditioning of a covariance matrix.

#
KalmanND

pub struct KalmanND {
x : Array[Double]
p : Matrix
q : Matrix
r : Matrix
f : Matrix
h : Matrix
initial_state : Array[Double]
initial_covariance : Matrix
last_innovation : Array[Double]
last_innovation_covariance : Matrix
last_gain : Matrix
last_nis : Double
gate_threshold : Double
predict_count : Int
accepted_count : Int
rejected_count : Int
missing_count : Int
}

Linear Kalman filter for dense state and measurement vectors.

The implementation uses the Joseph covariance form. Compared with the short textbook form, Joseph form better preserves symmetry and positive semidefiniteness when a sensor has very small noise.

#
KalmanND::accepted_count

fn KalmanND::accepted_count(self : KalmanND) -> Int

#
KalmanND::checkpoint

fn KalmanND::checkpoint(self : KalmanND, timestamp : Int) -> FilterCheckpoint

#
KalmanND::covariance

fn KalmanND::covariance(self : KalmanND) -> Matrix

#
KalmanND::filter

fn KalmanND::filter(self : KalmanND, measurements : Array[Array[Double]]) -> Array[Array[Double]]

Run a predict/update cycle for each measurement and return state history.

#
KalmanND::from_model

fn KalmanND::from_model(model : LinearModel, initial_state : Array[Double], initial_covariance : Matrix) -> KalmanND

#
KalmanND::gate_threshold

fn KalmanND::gate_threshold(self : KalmanND) -> Double

#
KalmanND::inflate_covariance

fn KalmanND::inflate_covariance(self : KalmanND, factor : Double, maximum : Double) -> Unit

Inflate covariance after a long sensor outage, with a hard cap for safety.

#
KalmanND::innovation

fn KalmanND::innovation(self : KalmanND) -> Array[Double]

#
KalmanND::innovation_covariance

fn KalmanND::innovation_covariance(self : KalmanND) -> Matrix

#
KalmanND::kalman_gain

fn KalmanND::kalman_gain(self : KalmanND) -> Matrix

#
KalmanND::last_update

fn KalmanND::last_update(self : KalmanND) -> UpdateSummary

#
KalmanND::measurement_dimension

fn KalmanND::measurement_dimension(self : KalmanND) -> Int

#
KalmanND::measurement_noise

fn KalmanND::measurement_noise(self : KalmanND) -> Matrix

#
KalmanND::missing_count

fn KalmanND::missing_count(self : KalmanND) -> Int

#
KalmanND::new

fn KalmanND::new(initial_state : Array[Double], initial_covariance : Array[Array[Double]], process_noise : Array[Array[Double]], measurement_noise : Array[Array[Double]], transition_model : Array[Array[Double]], observation_model : Array[Array[Double]]) -> KalmanND

#
KalmanND::normalized_innovation_squared

fn KalmanND::normalized_innovation_squared(self : KalmanND) -> Double

#
KalmanND::observation_model

fn KalmanND::observation_model(self : KalmanND) -> Matrix

#
KalmanND::predict

fn KalmanND::predict(self : KalmanND) -> Unit

#
KalmanND::predict_count

fn KalmanND::predict_count(self : KalmanND) -> Int

#
KalmanND::predict_with_control

fn KalmanND::predict_with_control(self : KalmanND, control : Array[Double]) -> Unit

Predict with an optional control vector. A zero-column control matrix is a valid model, so callers can use an empty vector for the no-control case.

#
KalmanND::predict_with_control_matrix

fn KalmanND::predict_with_control_matrix(self : KalmanND, control_effect : Matrix) -> Unit

Predict with a caller-supplied state-space control effect matrix.

#
KalmanND::process_noise

fn KalmanND::process_noise(self : KalmanND) -> Matrix

#
KalmanND::rejected_count

fn KalmanND::rejected_count(self : KalmanND) -> Int

#
KalmanND::reset

fn KalmanND::reset(self : KalmanND) -> Unit

#
KalmanND::restore

fn KalmanND::restore(self : KalmanND, state : Array[Double], covariance : Matrix) -> Bool

Restore a validated state/covariance pair, useful for checkpoint recovery.

#
KalmanND::restore_checkpoint

fn KalmanND::restore_checkpoint(self : KalmanND, checkpoint : FilterCheckpoint) -> Bool

#
KalmanND::set_gate_threshold

fn KalmanND::set_gate_threshold(self : KalmanND, threshold : Double) -> Unit

#
KalmanND::set_measurement_noise

fn KalmanND::set_measurement_noise(self : KalmanND, measurement_noise : Matrix) -> Bool

#
KalmanND::set_observation_model

fn KalmanND::set_observation_model(self : KalmanND, observation : Matrix) -> Bool

#
KalmanND::set_process_noise

fn KalmanND::set_process_noise(self : KalmanND, process_noise : Matrix) -> Bool

#
KalmanND::set_transition_model

fn KalmanND::set_transition_model(self : KalmanND, transition : Matrix) -> Bool

#
KalmanND::state

fn KalmanND::state(self : KalmanND) -> Array[Double]

#
KalmanND::state_dimension

fn KalmanND::state_dimension(self : KalmanND) -> Int

#
KalmanND::transition_model

fn KalmanND::transition_model(self : KalmanND) -> Matrix

#
KalmanND::update

fn KalmanND::update(self : KalmanND, measurement : Array[Double]) -> UpdateResult

#
KalmanND::update_and_report

fn KalmanND::update_and_report(self : KalmanND, measurement : Array[Double]) -> UpdateSummary

#
KalmanND::update_gated

fn KalmanND::update_gated(self : KalmanND, measurement : Array[Double], threshold : Double) -> UpdateResult

#
KalmanND::update_missing

fn KalmanND::update_missing(self : KalmanND) -> UpdateResult

#
KalmanND::update_partial

fn KalmanND::update_partial(self : KalmanND, measurement : Array[Double], mask : Array[Bool]) -> UpdateResult

Update a subset of measurement channels, preserving the full state model.

#
LinearModel

pub struct LinearModel {
transition : Matrix
process_noise : Matrix
observation : Matrix
measurement_noise : Matrix
control : Matrix
} derive(
Debug
)

A complete linear state-space model for a sensor-fusion pipeline.

#
LinearModel::control

fn LinearModel::control(self : LinearModel) -> Matrix

#
LinearModel::measurement_dimension

fn LinearModel::measurement_dimension(self : LinearModel) -> Int

#
LinearModel::measurement_noise

fn LinearModel::measurement_noise(self : LinearModel) -> Matrix

#
LinearModel::new

fn LinearModel::new(transition : Matrix, process_noise : Matrix, observation : Matrix, measurement_noise : Matrix, control : Matrix) -> LinearModel

#
LinearModel::observation

fn LinearModel::observation(self : LinearModel) -> Matrix

#
LinearModel::process_noise

fn LinearModel::process_noise(self : LinearModel) -> Matrix

#
LinearModel::state_dimension

fn LinearModel::state_dimension(self : LinearModel) -> Int

#
LinearModel::transition

fn LinearModel::transition(self : LinearModel) -> Matrix

#
Matrix

pub struct Matrix {
rows : Int
cols : Int
data : Array[Double]
} derive(
Debug
)

A compact row-major dense matrix used by the filtering algorithms.

Matrix deliberately keeps its storage private. This prevents callers from accidentally changing the shape while still allowing the numerical kernels to update values in place. The type is small enough for embedded and WebAssembly workloads and predictable enough for deterministic tests.

#
Matrix::add

fn Matrix::add(self : Matrix, other : Matrix) -> Matrix

Add two matrices. Invalid shapes produce a zero-sized matrix rather than allowing a partially computed result into a filter.

#
Matrix::add_diagonal

fn Matrix::add_diagonal(self : Matrix, value : Double) -> Matrix

#
Matrix::approx_equal

fn Matrix::approx_equal(self : Matrix, other : Matrix, tolerance : Double) -> Bool

#
Matrix::block_diagonal

fn Matrix::block_diagonal(blocks : Array[Matrix]) -> Matrix

Construct a block diagonal matrix from independent square blocks.

#
Matrix::cholesky

fn Matrix::cholesky(self : Matrix) -> Matrix?

Lower-triangular Cholesky factor. The result is None when the input is not symmetric positive definite.

#
Matrix::clamp_diagonal

fn Matrix::clamp_diagonal(self : Matrix, lower : Double, upper : Double) -> Matrix

#
Matrix::cols

fn Matrix::cols(self : Matrix) -> Int

#
Matrix::column

fn Matrix::column(self : Matrix, index : Int) -> Array[Double]

Return the requested column as a new owned array.

#
Matrix::column_sums

fn Matrix::column_sums(self : Matrix) -> Array[Double]

#
Matrix::condition_estimate

fn Matrix::condition_estimate(self : Matrix) -> Double

#
Matrix::copy

fn Matrix::copy(self : Matrix) -> Matrix

#
Matrix::determinant

fn Matrix::determinant(self : Matrix) -> Double

Determinant computed with partial pivoting. A zero result means that the matrix is singular or not square.

#
Matrix::diagonal

fn Matrix::diagonal(size : Int, value : Double) -> Matrix

Construct a matrix whose diagonal is value and whose other entries are zero.

#
Matrix::diagonal_max

fn Matrix::diagonal_max(self : Matrix) -> Double

#
Matrix::diagonal_min

fn Matrix::diagonal_min(self : Matrix) -> Double

#
Matrix::dominant_eigenpair

fn Matrix::dominant_eigenpair(self : Matrix, iterations : Int) -> DominantEigenpair

#
Matrix::fill

fn Matrix::fill(self : Matrix, value : Double) -> Unit

Fill every entry with the same value.

#
Matrix::finite_or_zero

fn Matrix::finite_or_zero(self : Matrix) -> Matrix

#
Matrix::frobenius_norm

fn Matrix::frobenius_norm(self : Matrix) -> Double

Frobenius norm, useful for residual and convergence checks.

#
Matrix::from_flat

fn Matrix::from_flat(rows : Int, cols : Int, values : Array[Double]) -> Matrix

Construct a matrix from a flat row-major buffer. Short buffers are padded with zeroes and long buffers are safely truncated.

#
Matrix::from_rows

fn Matrix::from_rows(source : Array[Array[Double]]) -> Matrix

Construct a matrix from rows. Ragged rows are accepted and missing cells are filled with zero; use try_from_rows when shape validation is needed.

#
Matrix::get

fn Matrix::get(self : Matrix, row : Int, col : Int) -> Double

Read an entry. This method is intended for validated matrix operations; use try_get when coordinates originate outside the algorithm.

#
Matrix::gram

fn Matrix::gram(self : Matrix) -> Matrix

#
Matrix::hadamard

fn Matrix::hadamard(self : Matrix, other : Matrix) -> Matrix

#
Matrix::horizontal_concat

fn Matrix::horizontal_concat(self : Matrix, other : Matrix) -> Matrix

#
Matrix::identity

fn Matrix::identity(size : Int) -> Matrix

Construct an identity matrix.

#
Matrix::infinity_norm

fn Matrix::infinity_norm(self : Matrix) -> Double

Infinity norm: maximum absolute row sum.

#
Matrix::inverse

fn Matrix::inverse(self : Matrix) -> Matrix?

Invert a matrix with the same pivoting strategy used by solve.

#
Matrix::is_diagonally_dominant

fn Matrix::is_diagonally_dominant(self : Matrix, strict : Bool) -> Bool

#
Matrix::is_empty

fn Matrix::is_empty(self : Matrix) -> Bool

#
Matrix::is_finite

fn Matrix::is_finite(self : Matrix) -> Bool

#
Matrix::is_square

fn Matrix::is_square(self : Matrix) -> Bool

#
Matrix::jacobi_eigenvalues

fn Matrix::jacobi_eigenvalues(self : Matrix, sweeps : Int) -> Array[Double]

Jacobi sweeps for a symmetric matrix. It is intentionally bounded: a diagnostic should always return even for malformed field data.

#
Matrix::kronecker

fn Matrix::kronecker(self : Matrix, other : Matrix) -> Matrix

#
Matrix::least_squares

fn Matrix::least_squares(self : Matrix, rhs : Array[Double]) -> MatrixSolveResult

Least-squares solution using QR decomposition.

#
Matrix::map

fn Matrix::map(self : Matrix, f : (Double) -> Double) -> Matrix

Apply a scalar function to every entry.

#
Matrix::map_indexed

fn Matrix::map_indexed(self : Matrix, f : (Int, Int, Double) -> Double) -> Matrix

Apply a function with row and column coordinates to every entry.

#
Matrix::max_abs

fn Matrix::max_abs(self : Matrix) -> Double

#
Matrix::multiply

fn Matrix::multiply(self : Matrix, other : Matrix) -> Matrix

General dense matrix multiplication.

#
Matrix::multiply_vector

fn Matrix::multiply_vector(self : Matrix, vector : Array[Double]) -> Array[Double]

#
Matrix::one_norm

fn Matrix::one_norm(self : Matrix) -> Double

One norm: maximum absolute column sum.

#
Matrix::outer

fn Matrix::outer(left : Array[Double], right : Array[Double]) -> Matrix

#
Matrix::power

fn Matrix::power(self : Matrix, exponent : Int) -> Matrix

#
Matrix::qr_decompose

fn Matrix::qr_decompose(self : Matrix) -> (Matrix, Matrix)?

QR decomposition by modified Gram-Schmidt. The returned pair is (Q, R) with orthonormal columns in Q and an upper-triangular R.

#
Matrix::rank

fn Matrix::rank(self : Matrix, tolerance : Double) -> Int

Rank estimate based on pivot magnitudes.

#
Matrix::regularized_cholesky

fn Matrix::regularized_cholesky(self : Matrix, initial_jitter : Double, attempts : Int) -> (Matrix, Double)?

Add a small diagonal jitter until Cholesky succeeds or the budget is exhausted. This is useful for covariance matrices assembled from noisy samples.

#
Matrix::regularized_least_squares

fn Matrix::regularized_least_squares(self : Matrix, rhs : Array[Double], regularization : Double) -> MatrixSolveResult

Tikhonov-regularized least squares for rank-deficient design matrices.

#
Matrix::replace_block

fn Matrix::replace_block(self : Matrix, source : Matrix, row : Int, col : Int) -> Matrix

Replace a block in a copy of the matrix. The source must fit completely.

#
Matrix::row

fn Matrix::row(self : Matrix, index : Int) -> Array[Double]

Return the requested row as a new owned array.

#
Matrix::row_sums

fn Matrix::row_sums(self : Matrix) -> Array[Double]

#
Matrix::rows

fn Matrix::rows(self : Matrix) -> Int

#
Matrix::scale

fn Matrix::scale(self : Matrix, factor : Double) -> Matrix

#
Matrix::set

fn Matrix::set(self : Matrix, row : Int, col : Int, value : Double) -> Bool

Set an entry when coordinates are valid. Returns whether the write was performed.

#
Matrix::size

fn Matrix::size(self : Matrix) -> Int

#
Matrix::skew_part

fn Matrix::skew_part(self : Matrix) -> Matrix

#
Matrix::slice

fn Matrix::slice(self : Matrix, row_start : Int, row_end : Int, col_start : Int, col_end : Int) -> Matrix

Extract a submatrix using half-open row and column ranges.

#
Matrix::solve

fn Matrix::solve(self : Matrix, rhs : Array[Double]) -> MatrixSolveResult

Solve A x = b with partial pivoting.

#
Matrix::sub

fn Matrix::sub(self : Matrix, other : Matrix) -> Matrix

#
Matrix::symmetric_part

fn Matrix::symmetric_part(self : Matrix) -> Matrix

#
Matrix::to_rows

fn Matrix::to_rows(self : Matrix) -> Array[Array[Double]]

Convert to independent row arrays for interop and inspection.

#
Matrix::trace

fn Matrix::trace(self : Matrix) -> Double

#
Matrix::transpose

fn Matrix::transpose(self : Matrix) -> Matrix

#
Matrix::try_from_rows

fn Matrix::try_from_rows(source : Array[Array[Double]]) -> Matrix?

Construct a matrix only when all rows have the same width.

#
Matrix::try_get

fn Matrix::try_get(self : Matrix, row : Int, col : Int) -> Double?

Read an entry without risking an out-of-bounds panic.

#
Matrix::valid_index

fn Matrix::valid_index(self : Matrix, row : Int, col : Int) -> Bool

Return whether a pair of coordinates is safe to access.

#
Matrix::vertical_concat

fn Matrix::vertical_concat(self : Matrix, other : Matrix) -> Matrix

#
Matrix::with_diagonal

fn Matrix::with_diagonal(self : Matrix, values : Array[Double]) -> Matrix

#
Matrix::zeros

fn Matrix::zeros(rows : Int, cols : Int) -> Matrix

Construct a zero-filled matrix.

#
MatrixSolveResult

pub(all) enum MatrixSolveResult {
Solved(Array[Double])
Singular
InvalidShape
} derive(Eq,
Debug
)

A result returned by a matrix operation that may be singular.

#
MeasurementSchedule

pub struct MeasurementSchedule {
period : Int
elapsed : Int
}

#
MeasurementSchedule::elapsed

fn MeasurementSchedule::elapsed(self : MeasurementSchedule) -> Int

#
MeasurementSchedule::new

fn MeasurementSchedule::new(period : Int) -> MeasurementSchedule

#
MeasurementSchedule::period

fn MeasurementSchedule::period(self : MeasurementSchedule) -> Int

#
MeasurementSchedule::tick

fn MeasurementSchedule::tick(self : MeasurementSchedule) -> Bool

#
MeasurementWindow

pub struct MeasurementWindow {
measurements : Array[FusionMeasurement]
capacity : Int
dimension : Int
}

Bounded multi-sensor measurement collection.

#
MeasurementWindow::clear

fn MeasurementWindow::clear(self : MeasurementWindow) -> Unit

#
MeasurementWindow::fuse

#
MeasurementWindow::length

fn MeasurementWindow::length(self : MeasurementWindow) -> Int

#
MeasurementWindow::measurements

#
MeasurementWindow::new

fn MeasurementWindow::new(capacity : Int, dimension : Int) -> MeasurementWindow

#
MeasurementWindow::push

fn MeasurementWindow::push(self : MeasurementWindow, measurement : FusionMeasurement) -> Bool

#
MissingObservationAction

pub(all) enum MissingObservationAction {
PredictOnly
InflateAndPredict
HoldLastEstimate
} derive(Eq,
Debug
)

#
MissingObservationPolicy

pub struct MissingObservationPolicy {
max_consecutive : Int
inflate_factor : Double
action : MissingObservationAction
} derive(
Debug
)

#
MissingObservationPolicy::action

#
MissingObservationPolicy::inflate_factor

fn MissingObservationPolicy::inflate_factor(self : MissingObservationPolicy) -> Double

#
MissingObservationPolicy::max_consecutive

fn MissingObservationPolicy::max_consecutive(self : MissingObservationPolicy) -> Int

#
MissingObservationPolicy::new

fn MissingObservationPolicy::new(max_consecutive : Int, inflate_factor : Double, action : MissingObservationAction) -> MissingObservationPolicy

#
ModelCatalog

pub struct ModelCatalog {
entries : Array[ModelCatalogEntry]
active_identity : String?
max_entries : Int
registrations : Int
selections : Int
} derive(
Debug
)

Versioned model catalog with explicit activation and selection.

#
ModelCatalog::activate

fn ModelCatalog::activate(self : ModelCatalog, identity : String) -> Bool

#
ModelCatalog::active_identity

fn ModelCatalog::active_identity(self : ModelCatalog) -> String?

#
ModelCatalog::enable

fn ModelCatalog::enable(self : ModelCatalog, identity : String, enabled : Bool) -> Bool

#
ModelCatalog::entries

#
ModelCatalog::find

fn ModelCatalog::find(self : ModelCatalog, identity : String) -> ModelCatalogEntry?

#
ModelCatalog::length

fn ModelCatalog::length(self : ModelCatalog) -> Int

#
ModelCatalog::new

fn ModelCatalog::new(max_entries : Int) -> ModelCatalog

#
ModelCatalog::register

fn ModelCatalog::register(self : ModelCatalog, entry : ModelCatalogEntry) -> Bool

#
ModelCatalog::registrations

fn ModelCatalog::registrations(self : ModelCatalog) -> Int

#
ModelCatalog::select

#
ModelCatalog::select_or_active

fn ModelCatalog::select_or_active(self : ModelCatalog, policy : ModelSelectionPolicy) -> ModelSelectionResult

#
ModelCatalog::selections

fn ModelCatalog::selections(self : ModelCatalog) -> Int

#
ModelCatalog::unregister

fn ModelCatalog::unregister(self : ModelCatalog, identity : String) -> Bool

#
ModelCatalogEntry

pub struct ModelCatalogEntry {
name : String
version : String
dimension : Int
metric : String
score : Double
latency_ms : Double
memory_bytes : Int
tags : Array[String]
enabled : Bool
uses : Int
} derive(
Debug
)

Metadata and runtime score for one deployable estimation model.

#
ModelCatalogEntry::compatible

fn ModelCatalogEntry::compatible(self : ModelCatalogEntry, dimension : Int, required_tags : Array[String]) -> Bool

#
ModelCatalogEntry::dimension

fn ModelCatalogEntry::dimension(self : ModelCatalogEntry) -> Int

#
ModelCatalogEntry::enabled

fn ModelCatalogEntry::enabled(self : ModelCatalogEntry) -> Bool

#
ModelCatalogEntry::has_tag

fn ModelCatalogEntry::has_tag(self : ModelCatalogEntry, tag : String) -> Bool

#
ModelCatalogEntry::identity

fn ModelCatalogEntry::identity(self : ModelCatalogEntry) -> String

#
ModelCatalogEntry::latency_ms

fn ModelCatalogEntry::latency_ms(self : ModelCatalogEntry) -> Double

#
ModelCatalogEntry::memory_bytes

fn ModelCatalogEntry::memory_bytes(self : ModelCatalogEntry) -> Int

#
ModelCatalogEntry::metric

fn ModelCatalogEntry::metric(self : ModelCatalogEntry) -> String

#
ModelCatalogEntry::name

fn ModelCatalogEntry::name(self : ModelCatalogEntry) -> String

#
ModelCatalogEntry::new

fn ModelCatalogEntry::new(name : String, version : String, dimension : Int, metric : String, score : Double, latency_ms : Double, memory_bytes : Int, tags : Array[String]) -> ModelCatalogEntry

#
ModelCatalogEntry::record_use

fn ModelCatalogEntry::record_use(self : ModelCatalogEntry) -> Unit

#
ModelCatalogEntry::score

fn ModelCatalogEntry::score(self : ModelCatalogEntry) -> Double

#
ModelCatalogEntry::set_enabled

fn ModelCatalogEntry::set_enabled(self : ModelCatalogEntry, enabled : Bool) -> Unit

#
ModelCatalogEntry::tags

fn ModelCatalogEntry::tags(self : ModelCatalogEntry) -> Array[String]

#
ModelCatalogEntry::uses

fn ModelCatalogEntry::uses(self : ModelCatalogEntry) -> Int

#
ModelCatalogEntry::version

fn ModelCatalogEntry::version(self : ModelCatalogEntry) -> String

#
ModelCatalogEntry::with_score

fn ModelCatalogEntry::with_score(self : ModelCatalogEntry, score : Double, latency_ms : Double) -> ModelCatalogEntry

#
ModelEvaluation

pub struct ModelEvaluation {
identity : String
eligible : Bool
score : Double
normalized_score : Double
reasons : Array[String]
} derive(
Debug
)

A scored evaluation returned by model selection.

#
ModelEvaluation::eligible

fn ModelEvaluation::eligible(self : ModelEvaluation) -> Bool

#
ModelEvaluation::identity

fn ModelEvaluation::identity(self : ModelEvaluation) -> String

#
ModelEvaluation::new

fn ModelEvaluation::new(entry : ModelCatalogEntry, eligible : Bool, normalized_score : Double, reasons : Array[String]) -> ModelEvaluation

#
ModelEvaluation::normalized_score

fn ModelEvaluation::normalized_score(self : ModelEvaluation) -> Double

#
ModelEvaluation::reasons

fn ModelEvaluation::reasons(self : ModelEvaluation) -> Array[String]

#
ModelEvaluation::score

fn ModelEvaluation::score(self : ModelEvaluation) -> Double

#
ModelRegistry

pub struct ModelRegistry {
dimension : Int
models : Array[LinearModel]
names : Array[String]
}

A reusable collection of linear models for a fixed state dimension.

#
ModelRegistry::add

fn ModelRegistry::add(self : ModelRegistry, name : String, model : LinearModel) -> Bool

#
ModelRegistry::clear

fn ModelRegistry::clear(self : ModelRegistry) -> Unit

#
ModelRegistry::length

fn ModelRegistry::length(self : ModelRegistry) -> Int

#
ModelRegistry::model

fn ModelRegistry::model(self : ModelRegistry, index : Int) -> LinearModel?

#
ModelRegistry::name

fn ModelRegistry::name(self : ModelRegistry, index : Int) -> String

#
ModelRegistry::names

fn ModelRegistry::names(self : ModelRegistry) -> Array[String]

#
ModelRegistry::new

fn ModelRegistry::new(dimension : Int) -> ModelRegistry

#
ModelScore

pub struct ModelScore {
name : String
rmse : Double
mae : Double
complexity : Int
consistency : Double
} derive(
Debug
)

Evidence collected while comparing a candidate model against observations.

#
ModelScore::complexity

fn ModelScore::complexity(self : ModelScore) -> Int

#
ModelScore::consistency

fn ModelScore::consistency(self : ModelScore) -> Double

#
ModelScore::mae

fn ModelScore::mae(self : ModelScore) -> Double

#
ModelScore::name

fn ModelScore::name(self : ModelScore) -> String

#
ModelScore::new

fn ModelScore::new(name : String, rmse : Double, mae : Double, complexity : Int, consistency : Double) -> ModelScore

#
ModelScore::objective

fn ModelScore::objective(self : ModelScore, complexity_penalty : Double) -> Double

#
ModelScore::rmse

fn ModelScore::rmse(self : ModelScore) -> Double

#
ModelSelectionPolicy

pub struct ModelSelectionPolicy {
metric : String
higher_is_better : Bool
max_latency_ms : Double
max_memory_bytes : Int
minimum_score : Double
required_tags : Array[String]
dimension : Int?
} derive(
Debug
)

Selection policy used to turn offline metrics into a deployable choice.

#
ModelSelectionPolicy::dimension

fn ModelSelectionPolicy::dimension(self : ModelSelectionPolicy) -> Int?

#
ModelSelectionPolicy::for_dimension

fn ModelSelectionPolicy::for_dimension(self : ModelSelectionPolicy, dimension : Int) -> ModelSelectionPolicy

#
ModelSelectionPolicy::higher_is_better

fn ModelSelectionPolicy::higher_is_better(self : ModelSelectionPolicy) -> Bool

#
ModelSelectionPolicy::max_latency_ms

fn ModelSelectionPolicy::max_latency_ms(self : ModelSelectionPolicy) -> Double

#
ModelSelectionPolicy::max_memory_bytes

fn ModelSelectionPolicy::max_memory_bytes(self : ModelSelectionPolicy) -> Int

#
ModelSelectionPolicy::metric

fn ModelSelectionPolicy::metric(self : ModelSelectionPolicy) -> String

#
ModelSelectionPolicy::minimum_score

fn ModelSelectionPolicy::minimum_score(self : ModelSelectionPolicy) -> Double

#
ModelSelectionPolicy::new

fn ModelSelectionPolicy::new(metric : String, higher_is_better : Bool, max_latency_ms : Double, max_memory_bytes : Int, minimum_score : Double) -> ModelSelectionPolicy

#
ModelSelectionPolicy::required_tags

fn ModelSelectionPolicy::required_tags(self : ModelSelectionPolicy) -> Array[String]

#
ModelSelectionPolicy::with_tags

fn ModelSelectionPolicy::with_tags(self : ModelSelectionPolicy, tags : Array[String]) -> ModelSelectionPolicy

#
ModelSelectionResult

pub struct ModelSelectionResult {
selected : ModelCatalogEntry?
evaluations : Array[ModelEvaluation]
fallback_used : Bool
reason : String
} derive(
Debug
)

Result of a selection pass, including explainability for rejected models.

#
ModelSelectionResult::evaluations

#
ModelSelectionResult::fallback_used

fn ModelSelectionResult::fallback_used(self : ModelSelectionResult) -> Bool

#
ModelSelectionResult::none

fn ModelSelectionResult::none(evaluations : Array[ModelEvaluation], reason : String) -> ModelSelectionResult

#
ModelSelectionResult::reason

fn ModelSelectionResult::reason(self : ModelSelectionResult) -> String

#
ModelSelectionResult::selected

fn ModelSelectionResult::selected(entry : ModelCatalogEntry, evaluations : Array[ModelEvaluation], fallback_used : Bool, reason : String) -> ModelSelectionResult

#
ModelSelectionResult::selected_entry

#
ModelSelector

pub struct ModelSelector {
scores : Array[ModelScore]
penalty : Double
}

#
ModelSelector::add

fn ModelSelector::add(self : ModelSelector, score : ModelScore) -> Unit

#
ModelSelector::best

#
ModelSelector::clear

fn ModelSelector::clear(self : ModelSelector) -> Unit

#
ModelSelector::length

fn ModelSelector::length(self : ModelSelector) -> Int

#
ModelSelector::new

fn ModelSelector::new(penalty : Double) -> ModelSelector

#
ModelSelector::penalty

fn ModelSelector::penalty(self : ModelSelector) -> Double

#
ModelSelector::ranking

#
ModelSelector::scores

#
ModelStep

pub struct ModelStep {
timestamp : Int
transition : Matrix
process_noise : Matrix
} derive(
Debug
)

#
ModelStep::new

fn ModelStep::new(timestamp : Int, transition : Matrix, process_noise : Matrix) -> ModelStep

#
ModelStep::process_noise

fn ModelStep::process_noise(self : ModelStep) -> Matrix

#
ModelStep::timestamp

fn ModelStep::timestamp(self : ModelStep) -> Int

#
ModelStep::transition

fn ModelStep::transition(self : ModelStep) -> Matrix

#
NoiseEstimate

pub struct NoiseEstimate {
variance : Double
standard_deviation : Double
samples : Int
confidence : Double
} derive(
Debug
)

Noise estimates inferred from paired truth/measurement samples.

#
NoiseEstimate::confidence

fn NoiseEstimate::confidence(self : NoiseEstimate) -> Double

#
NoiseEstimate::samples

fn NoiseEstimate::samples(self : NoiseEstimate) -> Int

#
NoiseEstimate::standard_deviation

fn NoiseEstimate::standard_deviation(self : NoiseEstimate) -> Double

#
NoiseEstimate::variance

fn NoiseEstimate::variance(self : NoiseEstimate) -> Double

#
NoiseSchedule

pub struct NoiseSchedule {
nominal : Double
minimum : Double
maximum : Double
growth : Double
decay : Double
factor : Double
stressed_steps : Int
}

A slowly adapting process-noise schedule. It reacts to sustained large innovations while decaying toward the nominal factor after recovery.

#
NoiseSchedule::factor

fn NoiseSchedule::factor(self : NoiseSchedule) -> Double

#
NoiseSchedule::new

fn NoiseSchedule::new(nominal : Double, minimum : Double, maximum : Double, growth : Double, decay : Double) -> NoiseSchedule

#
NoiseSchedule::observe

fn NoiseSchedule::observe(self : NoiseSchedule, nis : Double, threshold : Double) -> Double

#
NoiseSchedule::reset

fn NoiseSchedule::reset(self : NoiseSchedule) -> Unit

#
NoiseSchedule::stressed_steps

fn NoiseSchedule::stressed_steps(self : NoiseSchedule) -> Int

#
ObservationBuffer

pub struct ObservationBuffer {
packets : Array[ObservationPacket]
capacity : Int
}

A bounded packet queue. The oldest packet is dropped when capacity is reached, which is safer than allowing a delayed sensor to exhaust memory.

#
ObservationBuffer::capacity

fn ObservationBuffer::capacity(self : ObservationBuffer) -> Int

#
ObservationBuffer::clear

fn ObservationBuffer::clear(self : ObservationBuffer) -> Unit

#
ObservationBuffer::length

fn ObservationBuffer::length(self : ObservationBuffer) -> Int

#
ObservationBuffer::new

fn ObservationBuffer::new(capacity : Int) -> ObservationBuffer

#
ObservationBuffer::newest

#
ObservationBuffer::oldest

#
ObservationBuffer::packets

#
ObservationBuffer::push

fn ObservationBuffer::push(self : ObservationBuffer, packet : ObservationPacket) -> Bool

#
ObservationPacket

pub struct ObservationPacket {
timestamp : Int
sensor : String
values : Array[Double]
covariance : Matrix
} derive(
Debug
)

#
ObservationPacket::covariance

fn ObservationPacket::covariance(self : ObservationPacket) -> Matrix

#
ObservationPacket::is_valid

fn ObservationPacket::is_valid(self : ObservationPacket) -> Bool

#
ObservationPacket::new

fn ObservationPacket::new(timestamp : Int, sensor : String, values : Array[Double], covariance : Matrix) -> ObservationPacket

#
ObservationPacket::sensor

fn ObservationPacket::sensor(self : ObservationPacket) -> String

#
ObservationPacket::timestamp

fn ObservationPacket::timestamp(self : ObservationPacket) -> Int

#
ObservationPacket::values

fn ObservationPacket::values(self : ObservationPacket) -> Array[Double]

#
ObservationPacket::with_inflated_noise

fn ObservationPacket::with_inflated_noise(self : ObservationPacket, factor : Double) -> ObservationPacket

#
OperationalMonitor

pub struct OperationalMonitor {
samples : Int
accepted : Int
failures : Int
covariance_failures : Int
consecutive_failures : Int
worst_nis : Double
score : Double
warmup_samples : Int
failure_limit : Int
nis_limit : Double
}

Rolling health monitor suitable for long-running sensor services.

#
OperationalMonitor::accepted

fn OperationalMonitor::accepted(self : OperationalMonitor) -> Int

#
OperationalMonitor::consecutive_failures

fn OperationalMonitor::consecutive_failures(self : OperationalMonitor) -> Int

#
OperationalMonitor::covariance_failures

fn OperationalMonitor::covariance_failures(self : OperationalMonitor) -> Int

#
OperationalMonitor::failures

fn OperationalMonitor::failures(self : OperationalMonitor) -> Int

#
OperationalMonitor::new

fn OperationalMonitor::new(warmup_samples : Int, failure_limit : Int, nis_limit : Double) -> OperationalMonitor

#
OperationalMonitor::observe

fn OperationalMonitor::observe(self : OperationalMonitor, timestamp : Int, filter : KalmanND, result : UpdateResult) -> OperationalSnapshot

#
OperationalMonitor::reset

fn OperationalMonitor::reset(self : OperationalMonitor) -> Unit

#
OperationalMonitor::samples

fn OperationalMonitor::samples(self : OperationalMonitor) -> Int

#
OperationalMonitor::score

fn OperationalMonitor::score(self : OperationalMonitor) -> Double

#
OperationalMonitor::worst_nis

fn OperationalMonitor::worst_nis(self : OperationalMonitor) -> Double

#
OperationalSnapshot

pub struct OperationalSnapshot {
timestamp : Int
result : UpdateResult
status : FilterStatus
score : Double
nis : Double
state : Array[Double]
covariance : Matrix
} derive(
Debug
)

A point-in-time operational view. It is intentionally independent of a concrete filter type so it can be exported by a telemetry adapter.

#
OperationalSnapshot::covariance

#
OperationalSnapshot::nis

fn OperationalSnapshot::nis(self : OperationalSnapshot) -> Double

#
OperationalSnapshot::result

#
OperationalSnapshot::score

fn OperationalSnapshot::score(self : OperationalSnapshot) -> Double

#
OperationalSnapshot::state

fn OperationalSnapshot::state(self : OperationalSnapshot) -> Array[Double]

#
OperationalSnapshot::status

#
OperationalSnapshot::timestamp

fn OperationalSnapshot::timestamp(self : OperationalSnapshot) -> Int

#
OutlierDetector

pub struct OutlierDetector {
threshold : Double
stats : RunningStats
outlier_count : Int
}

#
OutlierDetector::new

fn OutlierDetector::new(threshold : Double) -> OutlierDetector

#
OutlierDetector::observe

fn OutlierDetector::observe(self : OutlierDetector, value : Double) -> Bool

#
OutlierDetector::outlier_count

fn OutlierDetector::outlier_count(self : OutlierDetector) -> Int

#
OutlierDetector::stats

#
PacketQuality

pub struct PacketQuality {
sensor : String
report : DataQualityReport
accepted : Bool
reason : String
} derive(
Debug
)

#
PacketQuality::accepted

fn PacketQuality::accepted(self : PacketQuality) -> Bool

#
PacketQuality::reason

fn PacketQuality::reason(self : PacketQuality) -> String

#
PacketQuality::report

#
PacketQuality::sensor

fn PacketQuality::sensor(self : PacketQuality) -> String

#
PipelineEvent

pub struct PipelineEvent {
fusion : FusionEvent
lifecycle : TrackLifecycle
sensor_score : Double
rolling_mean : Double
rolling_variance : Double
} derive(
Debug
)

End-to-end stream pipeline: preprocess packets, fuse a state estimate, and maintain lifecycle/health metadata for production telemetry.

#
PipelineEvent::fusion

#
PipelineEvent::lifecycle

fn PipelineEvent::lifecycle(self : PipelineEvent) -> TrackLifecycle

#
PipelineEvent::rolling_mean

fn PipelineEvent::rolling_mean(self : PipelineEvent) -> Double

#
PipelineEvent::rolling_variance

fn PipelineEvent::rolling_variance(self : PipelineEvent) -> Double

#
PipelineEvent::sensor_score

fn PipelineEvent::sensor_score(self : PipelineEvent) -> Double

#
PipelineReport

pub struct PipelineReport {
events : Int
accepted : Int
rejected : Int
missing : Int
final_lifecycle : TrackLifecycle
final_sensor_score : Double
} derive(
Debug
)

#
PipelineReport::accepted

fn PipelineReport::accepted(self : PipelineReport) -> Int

#
PipelineReport::events

fn PipelineReport::events(self : PipelineReport) -> Int

#
PipelineReport::final_lifecycle

fn PipelineReport::final_lifecycle(self : PipelineReport) -> TrackLifecycle

#
PipelineReport::final_sensor_score

fn PipelineReport::final_sensor_score(self : PipelineReport) -> Double

#
PipelineReport::missing

fn PipelineReport::missing(self : PipelineReport) -> Int

#
PipelineReport::rejected

fn PipelineReport::rejected(self : PipelineReport) -> Int

#
PolynomialBasis

pub struct PolynomialBasis {
degree : Int
center : Double
scale : Double
} derive(
Debug
)

A regularized polynomial basis description.

#
PolynomialBasis::center

fn PolynomialBasis::center(self : PolynomialBasis) -> Double

Return center.

#
PolynomialBasis::degree

fn PolynomialBasis::degree(self : PolynomialBasis) -> Int

Return polynomial degree.

#
PolynomialBasis::features

fn PolynomialBasis::features(self : PolynomialBasis, x : Double) -> Array[Double]

Evaluate the polynomial feature vector at a scalar input.

#
PolynomialBasis::new

fn PolynomialBasis::new(degree : Int, center : Double, scale : Double) -> PolynomialBasis

Construct a polynomial basis with a numerically stable center and scale.

#
PolynomialBasis::scale

fn PolynomialBasis::scale(self : PolynomialBasis) -> Double

Return scale.

#
Pose2D

pub struct Pose2D {
x : Double
y : Double
heading : Double
} derive(
Debug
)

#
Pose2D::distance

fn Pose2D::distance(self : Pose2D, other : Pose2D) -> Double

#
Pose2D::heading

fn Pose2D::heading(self : Pose2D) -> Double

#
Pose2D::new

fn Pose2D::new(x : Double, y : Double, heading : Double) -> Pose2D

#
Pose2D::rotate

fn Pose2D::rotate(self : Pose2D, amount : Double) -> Pose2D

#
Pose2D::translate

fn Pose2D::translate(self : Pose2D, dx : Double, dy : Double) -> Pose2D

#
Pose2D::x

fn Pose2D::x(self : Pose2D) -> Double

#
Pose2D::y

fn Pose2D::y(self : Pose2D) -> Double

#
Pose3D

pub struct Pose3D {
translation : Vec3D
rotation : Quaternion3D
} derive(
Debug
)

A rigid pose mapping local-frame points into a parent frame.

#
Pose3D::compose

fn Pose3D::compose(self : Pose3D, child : Pose3D) -> Pose3D

Compose this pose with a child pose.

#
Pose3D::interpolate

fn Pose3D::interpolate(self : Pose3D, other : Pose3D, amount : Double) -> Pose3D

Interpolate translation and orientation.

#
Pose3D::inverse

fn Pose3D::inverse(self : Pose3D) -> Pose3D

Return the inverse mapping.

#
Pose3D::is_finite

fn Pose3D::is_finite(self : Pose3D) -> Bool

Return whether the pose contains finite values.

#
Pose3D::new

fn Pose3D::new(translation : Vec3D, rotation : Quaternion3D) -> Pose3D

Construct a pose.

#
Pose3D::rotation

fn Pose3D::rotation(self : Pose3D) -> Quaternion3D

Return the rotation component.

#
Pose3D::to_matrix

fn Pose3D::to_matrix(self : Pose3D) -> Matrix

Convert the pose to a homogeneous 4x4 transform matrix.

#
Pose3D::to_vector

fn Pose3D::to_vector(self : Pose3D) -> Array[Double]

Convert a pose to a compact vector [tx, ty, tz, qw, qx, qy, qz].

#
Pose3D::transform_point

fn Pose3D::transform_point(self : Pose3D, point : Vec3D) -> Vec3D

Transform a point from local to parent coordinates.

#
Pose3D::transform_vector

fn Pose3D::transform_vector(self : Pose3D, value : Vec3D) -> Vec3D

Transform a direction without applying translation.

#
Pose3D::translation

fn Pose3D::translation(self : Pose3D) -> Vec3D

Return the translation component.

#
Pose3D::translation_distance

fn Pose3D::translation_distance(self : Pose3D, other : Pose3D) -> Double

Return the translation distance between poses.

#
Pose3DSeries

pub struct Pose3DSeries {
entries : Array[(Int, Pose3D)]
capacity : Int
rejected : Int
} derive(
Debug
)

A bounded sequence of timestamped poses for calibration and replay.

#
Pose3DSeries::capacity

fn Pose3DSeries::capacity(self : Pose3DSeries) -> Int

Return the configured capacity.

#
Pose3DSeries::clear

fn Pose3DSeries::clear(self : Pose3DSeries) -> Unit

Remove all stored poses and rejection history.

#
Pose3DSeries::duration

fn Pose3DSeries::duration(self : Pose3DSeries) -> Int

Return the timestamp span.

#
Pose3DSeries::entries

fn Pose3DSeries::entries(self : Pose3DSeries) -> Array[(Int, Pose3D)]

Return a copy of stored timestamp/pose pairs.

#
Pose3DSeries::first

fn Pose3DSeries::first(self : Pose3DSeries) -> (Int, Pose3D)?

Return the oldest entry.

#
Pose3DSeries::last

fn Pose3DSeries::last(self : Pose3DSeries) -> (Int, Pose3D)?

Return the newest entry.

#
Pose3DSeries::length

fn Pose3DSeries::length(self : Pose3DSeries) -> Int

Return the number of stored poses.

#
Pose3DSeries::new

fn Pose3DSeries::new(capacity : Int) -> Pose3DSeries

Construct an empty pose series.

#
Pose3DSeries::push

fn Pose3DSeries::push(self : Pose3DSeries, timestamp : Int, pose : Pose3D) -> Bool

Append a pose when its timestamp is monotonic and its values are finite.

#
Pose3DSeries::rejected

fn Pose3DSeries::rejected(self : Pose3DSeries) -> Int

Return the number of rejected poses.

#
Quaternion3D

pub struct Quaternion3D {
w : Double
x : Double
y : Double
z : Double
} derive(
Debug
)

A quaternion representing a three-dimensional orientation.

#
Quaternion3D::add_quaternion

fn Quaternion3D::add_quaternion(self : Quaternion3D, other : Quaternion3D) -> Quaternion3D

Add two quaternions component-wise for averaging.

#
Quaternion3D::conjugate

fn Quaternion3D::conjugate(self : Quaternion3D) -> Quaternion3D

Return the conjugate quaternion.

#
Quaternion3D::dot

fn Quaternion3D::dot(self : Quaternion3D, other : Quaternion3D) -> Double

Dot product of quaternion components.

#
Quaternion3D::inverse

fn Quaternion3D::inverse(self : Quaternion3D) -> Quaternion3D?

Return the inverse quaternion, when it exists.

#
Quaternion3D::is_finite

fn Quaternion3D::is_finite(self : Quaternion3D) -> Bool

Return whether all components are finite.

#
Quaternion3D::lerp

fn Quaternion3D::lerp(self : Quaternion3D, other : Quaternion3D, amount : Double) -> Quaternion3D

Interpolate quaternion components and renormalize. This avoids a trigonometric dependency while remaining stable for telemetry smoothing.

#
Quaternion3D::multiply

fn Quaternion3D::multiply(self : Quaternion3D, other : Quaternion3D) -> Quaternion3D

Hamilton product of two quaternions.

#
Quaternion3D::new

fn Quaternion3D::new(w : Double, x : Double, y : Double, z : Double) -> Quaternion3D

Construct a quaternion from scalar and vector parts.

#
Quaternion3D::norm

fn Quaternion3D::norm(self : Quaternion3D) -> Double

Return the quaternion norm.

#
Quaternion3D::norm_squared

fn Quaternion3D::norm_squared(self : Quaternion3D) -> Double

Return the squared quaternion norm.

#
Quaternion3D::normalize

fn Quaternion3D::normalize(self : Quaternion3D) -> Quaternion3D?

Normalize a quaternion, returning None for invalid input.

#
Quaternion3D::rotate

fn Quaternion3D::rotate(self : Quaternion3D, value : Vec3D) -> Vec3D

Rotate a vector using this quaternion. Non-unit inputs are normalized.

#
Quaternion3D::scale

fn Quaternion3D::scale(self : Quaternion3D, factor : Double) -> Quaternion3D

Scale all quaternion components.

#
Quaternion3D::to_matrix

fn Quaternion3D::to_matrix(self : Quaternion3D) -> Matrix

Convert a quaternion to a 3x3 rotation matrix.

#
Quaternion3D::w

fn Quaternion3D::w(self : Quaternion3D) -> Double

Access the scalar part.

#
Quaternion3D::x

fn Quaternion3D::x(self : Quaternion3D) -> Double

Access the x component.

#
Quaternion3D::y

fn Quaternion3D::y(self : Quaternion3D) -> Double

Access the y component.

#
Quaternion3D::z

fn Quaternion3D::z(self : Quaternion3D) -> Double

Access the z component.

#
RangeMeasurement

pub struct RangeMeasurement {
reference : Array[Double]
value : Double
variance : Double
} derive(
Debug
)

#
RangeMeasurement::jacobian

fn RangeMeasurement::jacobian(self : RangeMeasurement, position : Array[Double]) -> Array[Double]

#
RangeMeasurement::new

fn RangeMeasurement::new(reference : Array[Double], value : Double, variance : Double) -> RangeMeasurement

#
RangeMeasurement::reference

fn RangeMeasurement::reference(self : RangeMeasurement) -> Array[Double]

#
RangeMeasurement::residual

fn RangeMeasurement::residual(self : RangeMeasurement, position : Array[Double]) -> Double

#
RangeMeasurement::value

fn RangeMeasurement::value(self : RangeMeasurement) -> Double

#
RangeMeasurement::variance

fn RangeMeasurement::variance(self : RangeMeasurement) -> Double

#
RecursiveLeastSquares

pub struct RecursiveLeastSquares {
coefficients : Array[Double]
covariance : Matrix
forgetting : Double
updates : Int
rejected : Int
} derive(
Debug
)

A recursive least-squares estimator for slowly changing calibration.

#
RecursiveLeastSquares::coefficients

fn RecursiveLeastSquares::coefficients(self : RecursiveLeastSquares) -> Array[Double]

Return current coefficients.

#
RecursiveLeastSquares::covariance

Return parameter covariance.

#
RecursiveLeastSquares::forgetting

fn RecursiveLeastSquares::forgetting(self : RecursiveLeastSquares) -> Double

Return forgetting factor.

#
RecursiveLeastSquares::new

fn RecursiveLeastSquares::new(dimension : Int, initial_covariance : Double, forgetting : Double) -> RecursiveLeastSquares

Construct a recursive least-squares estimator.

#
RecursiveLeastSquares::predict

fn RecursiveLeastSquares::predict(self : RecursiveLeastSquares, features : Array[Double]) -> Double

Predict one scalar response.

#
RecursiveLeastSquares::rejected

fn RecursiveLeastSquares::rejected(self : RecursiveLeastSquares) -> Int

Return rejected update count.

#
RecursiveLeastSquares::reset

fn RecursiveLeastSquares::reset(self : RecursiveLeastSquares, covariance_scale : Double) -> Unit

Reset parameters to zero with a supplied covariance scale.

#
RecursiveLeastSquares::update

fn RecursiveLeastSquares::update(self : RecursiveLeastSquares, features : Array[Double], value : Double) -> Double?

Update RLS with one observation and return the innovation.

#
RecursiveLeastSquares::updates

fn RecursiveLeastSquares::updates(self : RecursiveLeastSquares) -> Int

Return update count.

#
ReplayEvent

pub(all) enum ReplayEvent {
Predict(Int)
Measure(Int, Array[Double])
Missing(Int)
Restore(FilterCheckpoint)
} derive(
Debug
)

A timestamped action that can be applied to a linear filter. Keeping the action separate from the filter makes offline reproduction and incident investigation deterministic: the same event stream produces the same state stream.

#
ReplayRecord

pub struct ReplayRecord {
timestamp : Int
result : UpdateResult
state : Array[Double]
covariance : Matrix
nis : Double
} derive(
Debug
)

One durable observation of a replay step.

#
ReplayRecord::covariance

fn ReplayRecord::covariance(self : ReplayRecord) -> Matrix

#
ReplayRecord::new

fn ReplayRecord::new(timestamp : Int, result : UpdateResult, state : Array[Double], covariance : Matrix, nis : Double) -> ReplayRecord

#
ReplayRecord::nis

fn ReplayRecord::nis(self : ReplayRecord) -> Double

#
ReplayRecord::result

fn ReplayRecord::result(self : ReplayRecord) -> UpdateResult

#
ReplayRecord::state

fn ReplayRecord::state(self : ReplayRecord) -> Array[Double]

#
ReplayRecord::timestamp

fn ReplayRecord::timestamp(self : ReplayRecord) -> Int

#
ReplayReport

pub struct ReplayReport {
steps : Int
accepted : Int
rejected : Int
missing : Int
invalid : Int
final_timestamp : Int
final_state : Array[Double]
final_covariance : Matrix
} derive(
Debug
)

Counts and records accumulated by a replay session.

#
ReplayReport::accepted

fn ReplayReport::accepted(self : ReplayReport) -> Int

#
ReplayReport::final_covariance

fn ReplayReport::final_covariance(self : ReplayReport) -> Matrix

#
ReplayReport::final_state

fn ReplayReport::final_state(self : ReplayReport) -> Array[Double]

#
ReplayReport::final_timestamp

fn ReplayReport::final_timestamp(self : ReplayReport) -> Int

#
ReplayReport::invalid

fn ReplayReport::invalid(self : ReplayReport) -> Int

#
ReplayReport::missing

fn ReplayReport::missing(self : ReplayReport) -> Int

#
ReplayReport::rejected

fn ReplayReport::rejected(self : ReplayReport) -> Int

#
ReplayReport::steps

fn ReplayReport::steps(self : ReplayReport) -> Int

#
ReplaySession

pub struct ReplaySession {
filter : KalmanND
trace : ReplayTrace
timestamp : Int
steps : Int
accepted : Int
rejected : Int
missing : Int
invalid : Int
}

Stateful replay runner for KalmanND. A runner owns its filter so callers can replay a log without mutating the production filter used elsewhere.

#
ReplaySession::accepted

fn ReplaySession::accepted(self : ReplaySession) -> Int

#
ReplaySession::filter

fn ReplaySession::filter(self : ReplaySession) -> KalmanND

#
ReplaySession::invalid

fn ReplaySession::invalid(self : ReplaySession) -> Int

#
ReplaySession::missing

fn ReplaySession::missing(self : ReplaySession) -> Int

#
ReplaySession::new

fn ReplaySession::new(filter : KalmanND, trace_capacity : Int) -> ReplaySession

#
ReplaySession::rejected

fn ReplaySession::rejected(self : ReplaySession) -> Int

#
ReplaySession::report

#
ReplaySession::reset

fn ReplaySession::reset(self : ReplaySession) -> Unit

#
ReplaySession::run

#
ReplaySession::step

#
ReplaySession::steps

fn ReplaySession::steps(self : ReplaySession) -> Int

#
ReplaySession::timestamp

fn ReplaySession::timestamp(self : ReplaySession) -> Int

#
ReplaySession::trace

#
ReplayTrace

pub struct ReplayTrace {
records : Array[ReplayRecord]
capacity : Int
}

An append-only, bounded replay ledger. The bounded mode is useful for embedded applications where a diagnostic trail must not grow forever.

#
ReplayTrace::capacity

fn ReplayTrace::capacity(self : ReplayTrace) -> Int

#
ReplayTrace::clear

fn ReplayTrace::clear(self : ReplayTrace) -> Unit

#
ReplayTrace::first

fn ReplayTrace::first(self : ReplayTrace) -> ReplayRecord?

#
ReplayTrace::last

fn ReplayTrace::last(self : ReplayTrace) -> ReplayRecord?

#
ReplayTrace::length

fn ReplayTrace::length(self : ReplayTrace) -> Int

#
ReplayTrace::new

fn ReplayTrace::new(capacity : Int) -> ReplayTrace

#
ReplayTrace::records

fn ReplayTrace::records(self : ReplayTrace) -> Array[ReplayRecord]

#
ResidualAction

pub(all) enum ResidualAction {
Accept
Downweight(Double)
Reject
} derive(Eq,
Debug
)

A robust residual policy used before a measurement enters a filter.

#
ResidualPolicy

pub struct ResidualPolicy {
soft_limit : Double
hard_limit : Double
minimum_weight : Double
accepted : Int
downweighted : Int
rejected : Int
}

#
ResidualPolicy::accepted

fn ResidualPolicy::accepted(self : ResidualPolicy) -> Int

#
ResidualPolicy::classify

fn ResidualPolicy::classify(self : ResidualPolicy, residual : Double) -> ResidualAction

#
ResidualPolicy::downweighted

fn ResidualPolicy::downweighted(self : ResidualPolicy) -> Int

#
ResidualPolicy::hard_limit

fn ResidualPolicy::hard_limit(self : ResidualPolicy) -> Double

#
ResidualPolicy::minimum_weight

fn ResidualPolicy::minimum_weight(self : ResidualPolicy) -> Double

#
ResidualPolicy::new

fn ResidualPolicy::new(soft_limit : Double, hard_limit : Double, minimum_weight : Double) -> ResidualPolicy

#
ResidualPolicy::rejected

fn ResidualPolicy::rejected(self : ResidualPolicy) -> Int

#
ResidualPolicy::reset

fn ResidualPolicy::reset(self : ResidualPolicy) -> Unit

#
ResidualPolicy::soft_limit

fn ResidualPolicy::soft_limit(self : ResidualPolicy) -> Double

#
RobustEstimate

pub struct RobustEstimate {
location : Double
scale : Double
iterations : Int
effective_samples : Double
residuals : Array[Double]
weights : Array[Double]
converged : Bool
} derive(
Debug
)

A scalar robust estimate with diagnostics.

#
RobustEstimate::converged

fn RobustEstimate::converged(self : RobustEstimate) -> Bool

Return whether the location iteration converged.

#
RobustEstimate::effective_samples

fn RobustEstimate::effective_samples(self : RobustEstimate) -> Double

Return the effective sample size.

#
RobustEstimate::iterations

fn RobustEstimate::iterations(self : RobustEstimate) -> Int

Return the number of iterations performed.

#
RobustEstimate::location

fn RobustEstimate::location(self : RobustEstimate) -> Double

Return the estimated location.

#
RobustEstimate::residuals

fn RobustEstimate::residuals(self : RobustEstimate) -> Array[Double]

Return a copy of residuals.

#
RobustEstimate::scale

fn RobustEstimate::scale(self : RobustEstimate) -> Double

Return the robust scale.

#
RobustEstimate::weights

fn RobustEstimate::weights(self : RobustEstimate) -> Array[Double]

Return a copy of final weights.

#
RobustEstimatorConfig

pub struct RobustEstimatorConfig {
loss : RobustLossKind
tuning : Double
iterations : Int
tolerance : Double
minimum_weight : Double
} derive(
Debug
)

Configuration shared by robust location and regression estimators.

#
RobustEstimatorConfig::iterations

fn RobustEstimatorConfig::iterations(self : RobustEstimatorConfig) -> Int

Return the iteration budget.

#
RobustEstimatorConfig::loss

Return the loss kind.

#
RobustEstimatorConfig::minimum_weight

fn RobustEstimatorConfig::minimum_weight(self : RobustEstimatorConfig) -> Double

Return the minimum retained weight.

#
RobustEstimatorConfig::new

fn RobustEstimatorConfig::new(loss : RobustLossKind, tuning : Double, iterations : Int, tolerance : Double, minimum_weight : Double) -> RobustEstimatorConfig

Construct a robust estimator configuration with safe defaults.

#
RobustEstimatorConfig::tolerance

fn RobustEstimatorConfig::tolerance(self : RobustEstimatorConfig) -> Double

Return the convergence tolerance.

#
RobustEstimatorConfig::tuning

fn RobustEstimatorConfig::tuning(self : RobustEstimatorConfig) -> Double

Return the tuning constant.

#
RobustLineFit

pub struct RobustLineFit {
intercept : Double
slope : Double
scale : Double
residuals : Array[Double]
weights : Array[Double]
iterations : Int
converged : Bool
} derive(
Debug
)

A robust straight-line fit y = intercept + slope * x.

#
RobustLineFit::converged

fn RobustLineFit::converged(self : RobustLineFit) -> Bool

Return convergence state.

#
RobustLineFit::intercept

fn RobustLineFit::intercept(self : RobustLineFit) -> Double

Return the fitted intercept.

#
RobustLineFit::iterations

fn RobustLineFit::iterations(self : RobustLineFit) -> Int

Return the number of line-fit iterations.

#
RobustLineFit::predict

fn RobustLineFit::predict(self : RobustLineFit, x : Double) -> Double

Predict a response from a robust line fit.

#
RobustLineFit::residuals

fn RobustLineFit::residuals(self : RobustLineFit) -> Array[Double]

Return a copy of line-fit residuals.

#
RobustLineFit::scale

fn RobustLineFit::scale(self : RobustLineFit) -> Double

Return the residual scale.

#
RobustLineFit::slope

fn RobustLineFit::slope(self : RobustLineFit) -> Double

Return the fitted slope.

#
RobustLineFit::weighted_error

fn RobustLineFit::weighted_error(self : RobustLineFit) -> Double

Compute a robust line's weighted residual sum of squares.

#
RobustLineFit::weights

fn RobustLineFit::weights(self : RobustLineFit) -> Array[Double]

Return final line-fit weights.

#
RobustLossKind

pub(all) enum RobustLossKind {
Squared
Huber
Cauchy
Tukey
Welsch
} derive(Eq,
Debug
)

Loss functions used by robust estimators for contaminated sensor data.

#
RobustResidualSummary

pub struct RobustResidualSummary {
count : Int
finite : Int
rejected : Int
mean : Double
median : Double
mad : Double
rms : Double
maximum : Double
positive : Int
negative : Int
} derive(
Debug
)

A residual distribution summary useful for quality dashboards.

#
RobustResidualSummary::count

Return residual count.

#
RobustResidualSummary::finite

Return finite residual count.

#
RobustResidualSummary::mad

Return residual MAD.

#
RobustResidualSummary::maximum

fn RobustResidualSummary::maximum(self : RobustResidualSummary) -> Double

Return maximum absolute residual.

#
RobustResidualSummary::mean

fn RobustResidualSummary::mean(self : RobustResidualSummary) -> Double

Return residual mean.

#
RobustResidualSummary::median

fn RobustResidualSummary::median(self : RobustResidualSummary) -> Double

Return residual median.

#
RobustResidualSummary::negative

fn RobustResidualSummary::negative(self : RobustResidualSummary) -> Int

Return negative residual count.

#
RobustResidualSummary::positive

fn RobustResidualSummary::positive(self : RobustResidualSummary) -> Int

Return positive residual count.

#
RobustResidualSummary::rejected

fn RobustResidualSummary::rejected(self : RobustResidualSummary) -> Int

Return rejected/non-finite count.

#
RobustResidualSummary::rms

Return residual RMS.

#
RobustSample

pub struct RobustSample {
value : Double
weight : Double
} derive(
Debug
)

A weighted scalar sample.

#
RobustSample::new

fn RobustSample::new(value : Double, weight : Double) -> RobustSample

Construct a weighted sample.

#
RobustSample::value

fn RobustSample::value(self : RobustSample) -> Double

Return the sample value.

#
RobustSample::weight

fn RobustSample::weight(self : RobustSample) -> Double

Return the sample weight.

#
RollingWindow

pub struct RollingWindow {
capacity : Int
values : Array[Double]
}

A bounded feature window for streaming sensor preprocessing.

#
RollingWindow::capacity

fn RollingWindow::capacity(self : RollingWindow) -> Int

#
RollingWindow::length

fn RollingWindow::length(self : RollingWindow) -> Int

#
RollingWindow::maximum

fn RollingWindow::maximum(self : RollingWindow) -> Double

#
RollingWindow::mean

fn RollingWindow::mean(self : RollingWindow) -> Double

#
RollingWindow::minimum

fn RollingWindow::minimum(self : RollingWindow) -> Double

#
RollingWindow::new

fn RollingWindow::new(capacity : Int) -> RollingWindow

#
RollingWindow::push

fn RollingWindow::push(self : RollingWindow, value : Double) -> Unit

#
RollingWindow::values

fn RollingWindow::values(self : RollingWindow) -> Array[Double]

#
RollingWindow::variance

fn RollingWindow::variance(self : RollingWindow) -> Double

#
RunningStats

pub struct RunningStats {
count : Int
mean : Double
second_moment : Double
minimum : Double
maximum : Double
}

Numerically stable streaming mean and variance using Welford's update.

#
RunningStats::add

fn RunningStats::add(self : RunningStats, value : Double) -> Unit

#
RunningStats::count

fn RunningStats::count(self : RunningStats) -> Int

#
RunningStats::maximum

fn RunningStats::maximum(self : RunningStats) -> Double

#
RunningStats::mean

fn RunningStats::mean(self : RunningStats) -> Double

#
RunningStats::minimum

fn RunningStats::minimum(self : RunningStats) -> Double

#
RunningStats::new

#
RunningStats::reset

fn RunningStats::reset(self : RunningStats) -> Unit

#
RunningStats::standard_deviation

fn RunningStats::standard_deviation(self : RunningStats) -> Double

#
RunningStats::variance

fn RunningStats::variance(self : RunningStats) -> Double

#
RunningStats::z_score

fn RunningStats::z_score(self : RunningStats, value : Double) -> Double

#
SafetyCheckResult

pub struct SafetyCheckResult {
status : SafetyCheckStatus
value : Double
margin : Double
violation : SafetyViolation?
} derive(
Debug
)

#
SafetyCheckResult::disabled

fn SafetyCheckResult::disabled(value : Double) -> SafetyCheckResult

#
SafetyCheckResult::invalid

fn SafetyCheckResult::invalid(value : Double) -> SafetyCheckResult

#
SafetyCheckResult::margin

fn SafetyCheckResult::margin(self : SafetyCheckResult) -> Double

#
SafetyCheckResult::safe

fn SafetyCheckResult::safe(value : Double, margin : Double) -> SafetyCheckResult

#
SafetyCheckResult::status

#
SafetyCheckResult::value

fn SafetyCheckResult::value(self : SafetyCheckResult) -> Double

#
SafetyCheckResult::violated

fn SafetyCheckResult::violated(value : Double, margin : Double, violation : SafetyViolation) -> SafetyCheckResult

#
SafetyCheckResult::violation

#
SafetyCheckStatus

pub enum SafetyCheckStatus {
Safe
Violated
InvalidInput
Disabled
} derive(Eq,
Debug
)

#
SafetyConstraint

pub struct SafetyConstraint {
name : String
kind : SafetyConstraintKind
threshold : Double
tolerance : Double
severity : Double
enabled : Bool
} derive(
Debug
)

#
SafetyConstraint::enabled

fn SafetyConstraint::enabled(self : SafetyConstraint) -> Bool

#
SafetyConstraint::kind

#
SafetyConstraint::name

fn SafetyConstraint::name(self : SafetyConstraint) -> String

#
SafetyConstraint::new

fn SafetyConstraint::new(name : String, kind : SafetyConstraintKind, threshold : Double, tolerance : Double, severity : Double) -> SafetyConstraint

#
SafetyConstraint::set_enabled

fn SafetyConstraint::set_enabled(self : SafetyConstraint, enabled : Bool) -> Unit

#
SafetyConstraint::severity

fn SafetyConstraint::severity(self : SafetyConstraint) -> Double

#
SafetyConstraint::threshold

fn SafetyConstraint::threshold(self : SafetyConstraint) -> Double

#
SafetyConstraint::tolerance

fn SafetyConstraint::tolerance(self : SafetyConstraint) -> Double

#
SafetyConstraintKind

pub enum SafetyConstraintKind {
LowerBound
UpperBound
AbsoluteBound
RateBound
DistanceFromPoint
MahalanobisBound
} derive(Eq,
Debug
)

A scalar or vector safety constraint applied to an estimated state.

#
SafetyEnvelope

pub struct SafetyEnvelope {
name : String
position_min : Vec3D
position_max : Vec3D
velocity_limit : Double
acceleration_limit : Double
uncertainty_limit : Double
checks : Int
violations : Int
last_timestamp : Int?
} derive(
Debug
)

#
SafetyEnvelope::acceleration_limit

fn SafetyEnvelope::acceleration_limit(self : SafetyEnvelope) -> Double

#
SafetyEnvelope::check_acceleration

fn SafetyEnvelope::check_acceleration(self : SafetyEnvelope, acceleration : Vec3D, timestamp : Int?) -> SafetyCheckResult

#
SafetyEnvelope::check_pose

fn SafetyEnvelope::check_pose(self : SafetyEnvelope, pose : Pose3D, velocity : Vec3D, covariance : Matrix, timestamp : Int?) -> Array[SafetyCheckResult]

#
SafetyEnvelope::check_position

fn SafetyEnvelope::check_position(self : SafetyEnvelope, position : Vec3D, timestamp : Int?) -> SafetyCheckResult

#
SafetyEnvelope::check_uncertainty

fn SafetyEnvelope::check_uncertainty(self : SafetyEnvelope, covariance : Matrix, timestamp : Int?) -> SafetyCheckResult

#
SafetyEnvelope::check_velocity

fn SafetyEnvelope::check_velocity(self : SafetyEnvelope, velocity : Vec3D, timestamp : Int?) -> SafetyCheckResult

#
SafetyEnvelope::checks

fn SafetyEnvelope::checks(self : SafetyEnvelope) -> Int

#
SafetyEnvelope::name

fn SafetyEnvelope::name(self : SafetyEnvelope) -> String

#
SafetyEnvelope::new

fn SafetyEnvelope::new(name : String, position_min : Vec3D, position_max : Vec3D, velocity_limit : Double, acceleration_limit : Double, uncertainty_limit : Double) -> SafetyEnvelope

#
SafetyEnvelope::position_max

fn SafetyEnvelope::position_max(self : SafetyEnvelope) -> Vec3D

#
SafetyEnvelope::position_min

fn SafetyEnvelope::position_min(self : SafetyEnvelope) -> Vec3D

#
SafetyEnvelope::uncertainty_limit

fn SafetyEnvelope::uncertainty_limit(self : SafetyEnvelope) -> Double

#
SafetyEnvelope::velocity_limit

fn SafetyEnvelope::velocity_limit(self : SafetyEnvelope) -> Double

#
SafetyEnvelope::violation_rate

fn SafetyEnvelope::violation_rate(self : SafetyEnvelope) -> Double

#
SafetyEnvelope::violations

fn SafetyEnvelope::violations(self : SafetyEnvelope) -> Int

#
SafetyViolation

pub struct SafetyViolation {
name : String
kind : SafetyConstraintKind
value : Double
threshold : Double
excess : Double
severity : Double
timestamp : Int?
} derive(
Debug
)

#
SafetyViolation::excess

fn SafetyViolation::excess(self : SafetyViolation) -> Double

#
SafetyViolation::kind

#
SafetyViolation::name

fn SafetyViolation::name(self : SafetyViolation) -> String

#
SafetyViolation::new

fn SafetyViolation::new(constraint : SafetyConstraint, value : Double, excess : Double, timestamp : Int?) -> SafetyViolation

#
SafetyViolation::severity

fn SafetyViolation::severity(self : SafetyViolation) -> Double

#
SafetyViolation::threshold

fn SafetyViolation::threshold(self : SafetyViolation) -> Double

#
SafetyViolation::timestamp

fn SafetyViolation::timestamp(self : SafetyViolation) -> Int?

#
SafetyViolation::value

fn SafetyViolation::value(self : SafetyViolation) -> Double

#
ScalarCalibration

pub struct ScalarCalibration {
measurement : NoiseEstimate
process : NoiseEstimate
recommended_process_noise : Double
recommended_measurement_noise : Double
} derive(
Debug
)

#
ScalarCalibration::measurement

#
ScalarCalibration::process

#
ScalarCalibration::recommended_measurement_noise

fn ScalarCalibration::recommended_measurement_noise(self : ScalarCalibration) -> Double

#
ScalarCalibration::recommended_process_noise

fn ScalarCalibration::recommended_process_noise(self : ScalarCalibration) -> Double

#
SensorCalibrator

pub struct SensorCalibrator {
dimension : Int
samples : Int
sum : Array[Double]
sum_squared : Matrix
}

Estimate an affine offset from reference-aligned samples.

#
SensorCalibrator::add

fn SensorCalibrator::add(self : SensorCalibrator, raw : Array[Double], reference : Array[Double]) -> Bool

#
SensorCalibrator::dimension

fn SensorCalibrator::dimension(self : SensorCalibrator) -> Int

#
SensorCalibrator::error_covariance

fn SensorCalibrator::error_covariance(self : SensorCalibrator) -> Matrix

#
SensorCalibrator::new

fn SensorCalibrator::new(dimension : Int) -> SensorCalibrator

#
SensorCalibrator::offset

fn SensorCalibrator::offset(self : SensorCalibrator) -> Array[Double]

#
SensorCalibrator::reset

fn SensorCalibrator::reset(self : SensorCalibrator) -> Unit

#
SensorCalibrator::samples

fn SensorCalibrator::samples(self : SensorCalibrator) -> Int

#
SensorCalibrator::transform

#
SensorClock

pub struct SensorClock {
period : Int
last_timestamp : Int?
samples : Int
late : Int
early : Int
jitter : RunningStats
}

Timestamp discipline and jitter statistics for an input channel.

#
SensorClock::early

fn SensorClock::early(self : SensorClock) -> Int

#
SensorClock::jitter_mean

fn SensorClock::jitter_mean(self : SensorClock) -> Double

#
SensorClock::jitter_variance

fn SensorClock::jitter_variance(self : SensorClock) -> Double

#
SensorClock::last_timestamp

fn SensorClock::last_timestamp(self : SensorClock) -> Int?

#
SensorClock::late

fn SensorClock::late(self : SensorClock) -> Int

#
SensorClock::new

fn SensorClock::new(period : Int) -> SensorClock

#
SensorClock::observe

fn SensorClock::observe(self : SensorClock, timestamp : Int) -> Bool

#
SensorClock::period

fn SensorClock::period(self : SensorClock) -> Int

#
SensorClock::reset

fn SensorClock::reset(self : SensorClock) -> Unit

#
SensorClock::samples

fn SensorClock::samples(self : SensorClock) -> Int

#
SensorClockFit

pub struct SensorClockFit {
offset : Double
drift : Double
reference : Int
residual_rms : Double
samples : Int
valid : Bool
} derive(
Debug
)

A linear clock correction estimated from paired timestamps.

#
SensorClockFit::correct

fn SensorClockFit::correct(self : SensorClockFit, timestamp : Int) -> Int

Correct a timestamp using this clock fit.

#
SensorClockFit::drift

fn SensorClockFit::drift(self : SensorClockFit) -> Double

Return clock drift as a fractional rate.

#
SensorClockFit::offset

fn SensorClockFit::offset(self : SensorClockFit) -> Double

Return clock offset.

#
SensorClockFit::reference

fn SensorClockFit::reference(self : SensorClockFit) -> Int

Return reference timestamp.

#
SensorClockFit::residual_rms

fn SensorClockFit::residual_rms(self : SensorClockFit) -> Double

Return residual RMS.

#
SensorClockFit::samples

fn SensorClockFit::samples(self : SensorClockFit) -> Int

Return pair count.

#
SensorClockFit::valid

fn SensorClockFit::valid(self : SensorClockFit) -> Bool

Return whether the fit is usable.

#
SensorConfiguration

pub struct SensorConfiguration {
name : String
dimension : Int
period : Int
timeout : Int
covariance : Matrix
enabled : Bool
} derive(
Debug
)

Static configuration for a sensor channel.

#
SensorConfiguration::covariance

#
SensorConfiguration::dimension

fn SensorConfiguration::dimension(self : SensorConfiguration) -> Int

#
SensorConfiguration::enabled

fn SensorConfiguration::enabled(self : SensorConfiguration) -> Bool

#
SensorConfiguration::name

fn SensorConfiguration::name(self : SensorConfiguration) -> String

#
SensorConfiguration::new

fn SensorConfiguration::new(name : String, dimension : Int, period : Int, timeout : Int, covariance : Matrix) -> SensorConfiguration

#
SensorConfiguration::period

fn SensorConfiguration::period(self : SensorConfiguration) -> Int

#
SensorConfiguration::set_enabled

fn SensorConfiguration::set_enabled(self : SensorConfiguration, enabled : Bool) -> Unit

#
SensorConfiguration::timeout

fn SensorConfiguration::timeout(self : SensorConfiguration) -> Int

#
SensorConfiguration::with_covariance

fn SensorConfiguration::with_covariance(self : SensorConfiguration, covariance : Matrix) -> SensorConfiguration

#
SensorFusion

pub struct SensorFusion {
filter : KalmanND
policy : FusionPolicy
statistics : FusionStatistics
consecutive_missing : Int
}

#
SensorFusion::covariance

fn SensorFusion::covariance(self : SensorFusion) -> Matrix

#
SensorFusion::new

fn SensorFusion::new(filter : KalmanND, policy : FusionPolicy) -> SensorFusion

#
SensorFusion::predict

fn SensorFusion::predict(self : SensorFusion) -> Unit

#
SensorFusion::process

fn SensorFusion::process(self : SensorFusion, packet : ObservationPacket) -> FusionEvent

#
SensorFusion::process_missing

fn SensorFusion::process_missing(self : SensorFusion, timestamp : Int, sensor : String) -> FusionEvent

#
SensorFusion::reset

fn SensorFusion::reset(self : SensorFusion) -> Unit

#
SensorFusion::run

#
SensorFusion::set_gate_threshold

fn SensorFusion::set_gate_threshold(self : SensorFusion, threshold : Double) -> Unit

#
SensorFusion::state

fn SensorFusion::state(self : SensorFusion) -> Array[Double]

#
SensorFusion::statistics

fn SensorFusion::statistics(self : SensorFusion) -> FusionStatistics

#
SensorHealth

pub struct SensorHealth {
name : String
score : Double
decay : Double
recovery : Double
minimum_score : Double
accepted : Int
rejected : Int
}

Per-sensor health state. It can be used to down-weight or disable a sensor before its failures destabilize a global track.

#
SensorHealth::accepted

fn SensorHealth::accepted(self : SensorHealth) -> Int

#
SensorHealth::is_usable

fn SensorHealth::is_usable(self : SensorHealth, threshold : Double) -> Bool

#
SensorHealth::name

fn SensorHealth::name(self : SensorHealth) -> String

#
SensorHealth::new

fn SensorHealth::new(name : String, decay : Double, recovery : Double) -> SensorHealth

#
SensorHealth::observe

fn SensorHealth::observe(self : SensorHealth, result : UpdateResult) -> Unit

#
SensorHealth::rejected

fn SensorHealth::rejected(self : SensorHealth) -> Int

#
SensorHealth::score

fn SensorHealth::score(self : SensorHealth) -> Double

#
SensorModelPair

pub struct SensorModelPair {
position : LinearModel
velocity : LinearModel
} derive(
Debug
)

A pair of models for position and velocity sensors sharing one state.

#
SensorModelPair::constant_velocity

fn SensorModelPair::constant_velocity(dimensions : Int, dt : Double, acceleration_variance : Double, position_variance : Double, velocity_variance : Double) -> SensorModelPair

#
SensorModelPair::position

#
SensorModelPair::velocity

#
SensorPacketBuilder

pub struct SensorPacketBuilder {
configuration : SensorConfiguration
calibration : CalibrationTransform
built : Int
rejected : Int
}

Builder for validated packets with a reusable calibration transform.

#
SensorPacketBuilder::build

fn SensorPacketBuilder::build(self : SensorPacketBuilder, timestamp : Int, values : Array[Double]) -> ObservationPacket?

#
SensorPacketBuilder::built

fn SensorPacketBuilder::built(self : SensorPacketBuilder) -> Int

#
SensorPacketBuilder::configuration

#
SensorPacketBuilder::new

#
SensorPacketBuilder::rejected

fn SensorPacketBuilder::rejected(self : SensorPacketBuilder) -> Int

#
SensorPacketBuilder::reset

fn SensorPacketBuilder::reset(self : SensorPacketBuilder) -> Unit

#
SensorPacketBuilder::set_calibration

fn SensorPacketBuilder::set_calibration(self : SensorPacketBuilder, calibration : CalibrationTransform) -> Bool

#
SensorPipeline

pub struct SensorPipeline {
fusion : SensorFusion
tracker : TrackManager
health : Map[String, SensorHealth]
windows : Map[String, RollingWindow]
window_capacity : Int
}

#
SensorPipeline::lifecycle

#
SensorPipeline::new

fn SensorPipeline::new(fusion : SensorFusion, confirmation_hits : Int, deletion_misses : Int, window_capacity : Int) -> SensorPipeline

#
SensorPipeline::process

#
SensorPipeline::process_missing

fn SensorPipeline::process_missing(self : SensorPipeline, timestamp : Int, sensor : String) -> PipelineEvent

#
SensorPipeline::run

#
SensorPipeline::sensor_health

fn SensorPipeline::sensor_health(self : SensorPipeline, sensor : String) -> SensorHealth

#
SensorPipeline::window

fn SensorPipeline::window(self : SensorPipeline, sensor : String) -> RollingWindow

#
SensorSample

pub struct SensorSample {
timestamp : Int
truth : Array[Double]
measurement : Array[Double]
missing : Bool
outlier : Bool
} derive(
Debug
)

#
SensorSample::measurement

fn SensorSample::measurement(self : SensorSample) -> Array[Double]

#
SensorSample::missing

fn SensorSample::missing(self : SensorSample) -> Bool

#
SensorSample::new

fn SensorSample::new(timestamp : Int, truth : Array[Double], measurement : Array[Double], missing : Bool, outlier : Bool) -> SensorSample

#
SensorSample::outlier

fn SensorSample::outlier(self : SensorSample) -> Bool

#
SensorSample::timestamp

fn SensorSample::timestamp(self : SensorSample) -> Int

#
SensorSample::truth

fn SensorSample::truth(self : SensorSample) -> Array[Double]

#
SimulationResult

pub struct SimulationResult {
samples : Array[SensorSample]
truth : Array[Array[Double]]
estimates : Array[Array[Double]]
metrics : ErrorMetrics
} derive(
Debug
)

#
SimulationResult::estimates

fn SimulationResult::estimates(self : SimulationResult) -> Array[Array[Double]]

#
SimulationResult::metrics

#
SimulationResult::samples

#
SimulationResult::truth

fn SimulationResult::truth(self : SimulationResult) -> Array[Array[Double]]

#
SmoothingResult

pub struct SmoothingResult {
states : Array[Array[Double]]
covariances : Array[Matrix]
} derive(
Debug
)

Result of a Rauch-Tung-Striebel backward pass.

#
SmoothingResult::covariances

fn SmoothingResult::covariances(self : SmoothingResult) -> Array[Matrix]

#
SmoothingResult::length

fn SmoothingResult::length(self : SmoothingResult) -> Int

#
SmoothingResult::states

fn SmoothingResult::states(self : SmoothingResult) -> Array[Array[Double]]

#
StateCandidate

pub struct StateCandidate {
name : String
state : Array[Double]
covariance : Matrix
weight : Double
result : UpdateResult
} derive(
Debug
)

A weighted state candidate used to compare independent estimators.

#
StateCandidate::covariance

fn StateCandidate::covariance(self : StateCandidate) -> Matrix

#
StateCandidate::is_usable

fn StateCandidate::is_usable(self : StateCandidate) -> Bool

#
StateCandidate::name

fn StateCandidate::name(self : StateCandidate) -> String

#
StateCandidate::new

fn StateCandidate::new(name : String, state : Array[Double], covariance : Matrix, weight : Double, result : UpdateResult) -> StateCandidate

#
StateCandidate::result

#
StateCandidate::state

fn StateCandidate::state(self : StateCandidate) -> Array[Double]

#
StateCandidate::weight

fn StateCandidate::weight(self : StateCandidate) -> Double

#
StateGuard

pub struct StateGuard {
rules : Array[StateGuardRule]
reject_invalid : Bool
reject_excess : Double
checks : Int
rejected : Int
clipped : Int
} derive(
Debug
)

A state sanitizer applies bounds while preserving untouched dimensions.

#
StateGuard::check

fn StateGuard::check(self : StateGuard, state : Array[Double]) -> StateGuardReport

#
StateGuard::checks

fn StateGuard::checks(self : StateGuard) -> Int

#
StateGuard::clipped

fn StateGuard::clipped(self : StateGuard) -> Int

#
StateGuard::new

fn StateGuard::new(rules : Array[StateGuardRule], reject_invalid : Bool, reject_excess : Double) -> StateGuard

#
StateGuard::rejected

fn StateGuard::rejected(self : StateGuard) -> Int

#
StateGuard::rejection_rate

fn StateGuard::rejection_rate(self : StateGuard) -> Double

#
StateGuard::repair

fn StateGuard::repair(self : StateGuard, state : Array[Double]) -> Array[Double]

#
StateGuard::reset_metrics

fn StateGuard::reset_metrics(self : StateGuard) -> Unit

#
StateGuard::rules

#
StateGuardIssue

pub struct StateGuardIssue {
index : Int
name : String
value : Double
projected : Double
excess : Double
status : StateGuardStatus
} derive(
Debug
)

#
StateGuardIssue::excess

fn StateGuardIssue::excess(self : StateGuardIssue) -> Double

#
StateGuardIssue::index

fn StateGuardIssue::index(self : StateGuardIssue) -> Int

#
StateGuardIssue::name

fn StateGuardIssue::name(self : StateGuardIssue) -> String

#
StateGuardIssue::new

fn StateGuardIssue::new(rule : StateGuardRule, value : Double, projected : Double, status : StateGuardStatus) -> StateGuardIssue

#
StateGuardIssue::projected

fn StateGuardIssue::projected(self : StateGuardIssue) -> Double

#
StateGuardIssue::status

#
StateGuardIssue::value

fn StateGuardIssue::value(self : StateGuardIssue) -> Double

#
StateGuardReport

pub struct StateGuardReport {
original : Array[Double]
repaired : Array[Double]
issues : Array[StateGuardIssue]
accepted : Bool
changed : Bool
score : Double
} derive(
Debug
)

#
StateGuardReport::accepted

fn StateGuardReport::accepted(self : StateGuardReport) -> Bool

#
StateGuardReport::changed

fn StateGuardReport::changed(self : StateGuardReport) -> Bool

#
StateGuardReport::is_usable

fn StateGuardReport::is_usable(self : StateGuardReport) -> Bool

#
StateGuardReport::issues

#
StateGuardReport::new

fn StateGuardReport::new(original : Array[Double], repaired : Array[Double], issues : Array[StateGuardIssue], accepted : Bool) -> StateGuardReport

#
StateGuardReport::original

fn StateGuardReport::original(self : StateGuardReport) -> Array[Double]

#
StateGuardReport::repaired

fn StateGuardReport::repaired(self : StateGuardReport) -> Array[Double]

#
StateGuardReport::score

fn StateGuardReport::score(self : StateGuardReport) -> Double

#
StateGuardRule

pub struct StateGuardRule {
index : Int
name : String
minimum : Double
maximum : Double
tolerance : Double
enabled : Bool
} derive(
Debug
)

A named bound for one component of a filter state.

#
StateGuardRule::contains

fn StateGuardRule::contains(self : StateGuardRule, value : Double) -> Bool

#
StateGuardRule::enabled

fn StateGuardRule::enabled(self : StateGuardRule) -> Bool

#
StateGuardRule::index

fn StateGuardRule::index(self : StateGuardRule) -> Int

#
StateGuardRule::maximum

fn StateGuardRule::maximum(self : StateGuardRule) -> Double

#
StateGuardRule::minimum

fn StateGuardRule::minimum(self : StateGuardRule) -> Double

#
StateGuardRule::name

fn StateGuardRule::name(self : StateGuardRule) -> String

#
StateGuardRule::new

fn StateGuardRule::new(index : Int, name : String, minimum : Double, maximum : Double, tolerance : Double) -> StateGuardRule

#
StateGuardRule::project

fn StateGuardRule::project(self : StateGuardRule, value : Double) -> Double

#
StateGuardRule::set_enabled

fn StateGuardRule::set_enabled(self : StateGuardRule, enabled : Bool) -> Unit

#
StateGuardRule::tolerance

fn StateGuardRule::tolerance(self : StateGuardRule) -> Double

#
StateGuardStatus

pub enum StateGuardStatus {
StateGuardOk
StateGuardClipped
StateGuardRejected
StateGuardInvalid
} derive(Eq,
Debug
)

#
StreamCursor

pub struct StreamCursor {
next_sequence : Int
last_timestamp : Int?
accepted : Int
rejected : Int
duplicate : Int
out_of_order : Int
} derive(
Debug
)

A cursor tracks consumption and supports replay-safe sequence checks.

#
StreamCursor::accept

fn StreamCursor::accept(self : StreamCursor, record : StreamRecord) -> Bool

#
StreamCursor::accepted

fn StreamCursor::accepted(self : StreamCursor) -> Int

#
StreamCursor::duplicate

fn StreamCursor::duplicate(self : StreamCursor) -> Int

#
StreamCursor::new

fn StreamCursor::new(start_sequence : Int) -> StreamCursor

#
StreamCursor::next_sequence

fn StreamCursor::next_sequence(self : StreamCursor) -> Int

#
StreamCursor::out_of_order

fn StreamCursor::out_of_order(self : StreamCursor) -> Int

#
StreamCursor::rejected

fn StreamCursor::rejected(self : StreamCursor) -> Int

#
StreamCursor::reset

fn StreamCursor::reset(self : StreamCursor, sequence : Int) -> Unit

#
StreamDecision

pub enum StreamDecision {
AcceptedRecord
RejectedInvalid
RejectedDuplicate
Backpressure
} derive(Eq,
Debug
)

Operational decisions emitted by a stream processor.

#
StreamRecord

pub struct StreamRecord {
timestamp : Int
value : Double
source : String
sequence : Int
valid : Bool
} derive(
Debug
)

A timestamped scalar record accepted by the streaming runtime.

#
StreamRecord::age

fn StreamRecord::age(self : StreamRecord, now : Int) -> Int

#
StreamRecord::new

fn StreamRecord::new(timestamp : Int, value : Double, source : String, sequence : Int) -> StreamRecord

#
StreamRecord::sequence

fn StreamRecord::sequence(self : StreamRecord) -> Int

#
StreamRecord::source

fn StreamRecord::source(self : StreamRecord) -> String

#
StreamRecord::timestamp

fn StreamRecord::timestamp(self : StreamRecord) -> Int

#
StreamRecord::valid

fn StreamRecord::valid(self : StreamRecord) -> Bool

#
StreamRecord::value

fn StreamRecord::value(self : StreamRecord) -> Double

#
StreamRecord::with_value

fn StreamRecord::with_value(self : StreamRecord, value : Double) -> StreamRecord

#
StreamRuntime

pub struct StreamRuntime {
window : StreamWindow
cursor : StreamCursor
max_queue : Int
queue : Array[StreamRecord]
processed : Int
dropped : Int
emitted : Int
backpressure : Int
} derive(
Debug
)

A production-oriented scalar stream processor.

#
StreamRuntime::backpressure

fn StreamRuntime::backpressure(self : StreamRuntime) -> Int

#
StreamRuntime::cursor

#
StreamRuntime::drain

fn StreamRuntime::drain(self : StreamRuntime, limit : Int) -> Int

#
StreamRuntime::dropped

fn StreamRuntime::dropped(self : StreamRuntime) -> Int

#
StreamRuntime::emit_if_ready

fn StreamRuntime::emit_if_ready(self : StreamRuntime) -> StreamStatistics?

#
StreamRuntime::emitted

fn StreamRuntime::emitted(self : StreamRuntime) -> Int

#
StreamRuntime::flush

fn StreamRuntime::flush(self : StreamRuntime) -> Int

#
StreamRuntime::ingest

fn StreamRuntime::ingest(self : StreamRuntime, record : StreamRecord) -> StreamDecision

#
StreamRuntime::new

fn StreamRuntime::new(spec : StreamWindowSpec, start_sequence : Int, max_queue : Int) -> StreamRuntime

#
StreamRuntime::processed

fn StreamRuntime::processed(self : StreamRuntime) -> Int

#
StreamRuntime::queue_length

fn StreamRuntime::queue_length(self : StreamRuntime) -> Int

#
StreamRuntime::reset

fn StreamRuntime::reset(self : StreamRuntime, sequence : Int) -> Unit

#
StreamRuntime::window

#
StreamStatistics

pub struct StreamStatistics {
count : Int
mean : Double
variance : Double
minimum : Double
maximum : Double
first_timestamp : Int?
last_timestamp : Int?
slope : Double
valid : Bool
} derive(
Debug
)

Aggregate statistics for a window, computed without retaining mutable state.

#
StreamStatistics::count

fn StreamStatistics::count(self : StreamStatistics) -> Int

#
StreamStatistics::empty

#
StreamStatistics::first_timestamp

fn StreamStatistics::first_timestamp(self : StreamStatistics) -> Int?

#
StreamStatistics::last_timestamp

fn StreamStatistics::last_timestamp(self : StreamStatistics) -> Int?

#
StreamStatistics::maximum

fn StreamStatistics::maximum(self : StreamStatistics) -> Double

#
StreamStatistics::mean

fn StreamStatistics::mean(self : StreamStatistics) -> Double

#
StreamStatistics::minimum

fn StreamStatistics::minimum(self : StreamStatistics) -> Double

#
StreamStatistics::slope

fn StreamStatistics::slope(self : StreamStatistics) -> Double

#
StreamStatistics::standard_deviation

fn StreamStatistics::standard_deviation(self : StreamStatistics) -> Double

#
StreamStatistics::valid

fn StreamStatistics::valid(self : StreamStatistics) -> Bool

#
StreamStatistics::variance

fn StreamStatistics::variance(self : StreamStatistics) -> Double

#
StreamWindow

pub struct StreamWindow {
spec : StreamWindowSpec
records : Array[StreamRecord]
watermark : Int?
max_timestamp : Int?
late_count : Int
invalid_count : Int
evicted_count : Int
} derive(
Debug
)

Event-time window with bounded memory and watermark accounting.

#
StreamWindow::advance_watermark

fn StreamWindow::advance_watermark(self : StreamWindow, timestamp : Int) -> Unit

#
StreamWindow::clear

fn StreamWindow::clear(self : StreamWindow) -> Unit

#
StreamWindow::contains_timestamp

fn StreamWindow::contains_timestamp(self : StreamWindow, timestamp : Int) -> Bool

#
StreamWindow::evicted_count

fn StreamWindow::evicted_count(self : StreamWindow) -> Int

#
StreamWindow::invalid_count

fn StreamWindow::invalid_count(self : StreamWindow) -> Int

#
StreamWindow::late_count

fn StreamWindow::late_count(self : StreamWindow) -> Int

#
StreamWindow::length

fn StreamWindow::length(self : StreamWindow) -> Int

#
StreamWindow::new

#
StreamWindow::push

fn StreamWindow::push(self : StreamWindow, record : StreamRecord) -> Bool

Push a record, returning whether it participates in the active window.

#
StreamWindow::records

#
StreamWindow::span

fn StreamWindow::span(self : StreamWindow) -> Int

#
StreamWindow::spec

#
StreamWindow::watermark

fn StreamWindow::watermark(self : StreamWindow) -> Int?

#
StreamWindowSpec

pub struct StreamWindowSpec {
width : Int
lateness : Int
capacity : Int
min_samples : Int
allow_out_of_order : Bool
} derive(
Debug
)

Window semantics for event-time processing.

#
StreamWindowSpec::allow_out_of_order

fn StreamWindowSpec::allow_out_of_order(self : StreamWindowSpec) -> Bool

#
StreamWindowSpec::capacity

fn StreamWindowSpec::capacity(self : StreamWindowSpec) -> Int

#
StreamWindowSpec::lateness

fn StreamWindowSpec::lateness(self : StreamWindowSpec) -> Int

#
StreamWindowSpec::min_samples

fn StreamWindowSpec::min_samples(self : StreamWindowSpec) -> Int

#
StreamWindowSpec::new

fn StreamWindowSpec::new(width : Int, lateness : Int, capacity : Int, min_samples : Int) -> StreamWindowSpec

#
StreamWindowSpec::width

fn StreamWindowSpec::width(self : StreamWindowSpec) -> Int

#
StreamWindowSpec::with_out_of_order

fn StreamWindowSpec::with_out_of_order(self : StreamWindowSpec, enabled : Bool) -> StreamWindowSpec

#
Synchronizer

pub struct Synchronizer {
tolerance : Int
last_timestamp : Int?
accepted : Int
rejected : Int
}

#
Synchronizer::accept

fn Synchronizer::accept(self : Synchronizer, timestamp : Int) -> Bool

#
Synchronizer::accepted

fn Synchronizer::accepted(self : Synchronizer) -> Int

#
Synchronizer::last_timestamp

fn Synchronizer::last_timestamp(self : Synchronizer) -> Int?

#
Synchronizer::new

fn Synchronizer::new(tolerance : Int) -> Synchronizer

#
Synchronizer::rejected

fn Synchronizer::rejected(self : Synchronizer) -> Int

#
Synchronizer::reset

fn Synchronizer::reset(self : Synchronizer) -> Unit

#
Synchronizer::tolerance

fn Synchronizer::tolerance(self : Synchronizer) -> Int

#
TelemetrySample

pub struct TelemetrySample {
timestamp : Int
channel : String
value : Double
quality : Double
result : UpdateResult
} derive(
Debug
)

A lightweight scalar telemetry record for dashboards and field logs.

#
TelemetrySample::channel

fn TelemetrySample::channel(self : TelemetrySample) -> String

#
TelemetrySample::is_finite

fn TelemetrySample::is_finite(self : TelemetrySample) -> Bool

#
TelemetrySample::new

fn TelemetrySample::new(timestamp : Int, channel : String, value : Double, quality : Double, result : UpdateResult) -> TelemetrySample

#
TelemetrySample::quality

fn TelemetrySample::quality(self : TelemetrySample) -> Double

#
TelemetrySample::result

#
TelemetrySample::timestamp

fn TelemetrySample::timestamp(self : TelemetrySample) -> Int

#
TelemetrySample::value

fn TelemetrySample::value(self : TelemetrySample) -> Double

#
TelemetrySeries

pub struct TelemetrySeries {
samples : Array[TelemetrySample]
capacity : Int
rejected : Int
}

#
TelemetrySeries::duration

fn TelemetrySeries::duration(self : TelemetrySeries) -> Int

#
TelemetrySeries::length

fn TelemetrySeries::length(self : TelemetrySeries) -> Int

#
TelemetrySeries::mean

fn TelemetrySeries::mean(self : TelemetrySeries) -> Double

#
TelemetrySeries::new

fn TelemetrySeries::new(capacity : Int) -> TelemetrySeries

#
TelemetrySeries::push

fn TelemetrySeries::push(self : TelemetrySeries, sample : TelemetrySample) -> Bool

#
TelemetrySeries::quality

fn TelemetrySeries::quality(self : TelemetrySeries) -> Double

#
TelemetrySeries::rejected

fn TelemetrySeries::rejected(self : TelemetrySeries) -> Int

#
TelemetrySeries::reset

fn TelemetrySeries::reset(self : TelemetrySeries) -> Unit

#
TelemetrySeries::samples

#
TelemetrySeries::variance

fn TelemetrySeries::variance(self : TelemetrySeries) -> Double

#
TelemetrySummary

pub struct TelemetrySummary {
samples : Int
accepted : Int
missing : Int
rejected : Int
mean : Double
variance : Double
quality : Double
status : FilterStatus
} derive(
Debug
)

#
TelemetrySummary::accepted

fn TelemetrySummary::accepted(self : TelemetrySummary) -> Int

#
TelemetrySummary::mean

fn TelemetrySummary::mean(self : TelemetrySummary) -> Double

#
TelemetrySummary::missing

fn TelemetrySummary::missing(self : TelemetrySummary) -> Int

#
TelemetrySummary::quality

fn TelemetrySummary::quality(self : TelemetrySummary) -> Double

#
TelemetrySummary::rejected

fn TelemetrySummary::rejected(self : TelemetrySummary) -> Int

#
TelemetrySummary::samples

fn TelemetrySummary::samples(self : TelemetrySummary) -> Int

#
TelemetrySummary::status

#
TelemetrySummary::variance

fn TelemetrySummary::variance(self : TelemetrySummary) -> Double

#
TimedVector

pub struct TimedVector {
timestamp : Int
values : Array[Double]
quality : Double
} derive(
Debug
)

A timestamped vector sample used by asynchronous sensor adapters.

#
TimedVector::dimension

fn TimedVector::dimension(self : TimedVector) -> Int

Return the vector dimension.

#
TimedVector::is_valid

fn TimedVector::is_valid(self : TimedVector) -> Bool

Return whether the sample is finite and non-empty.

#
TimedVector::new

fn TimedVector::new(timestamp : Int, values : Array[Double], quality : Double) -> TimedVector

Construct a timestamped vector. The values are copied at the boundary.

#
TimedVector::quality

fn TimedVector::quality(self : TimedVector) -> Double

Return the sample quality.

#
TimedVector::scale

fn TimedVector::scale(self : TimedVector, factor : Double) -> TimedVector

Scale all vector components.

#
TimedVector::shift

fn TimedVector::shift(self : TimedVector, offset : Int) -> TimedVector

Shift the timestamp by an integer offset.

#
TimedVector::timestamp

fn TimedVector::timestamp(self : TimedVector) -> Int

Return the timestamp.

#
TimedVector::values

fn TimedVector::values(self : TimedVector) -> Array[Double]

Return a copy of the sample vector.

#
TimedVector::with_quality

fn TimedVector::with_quality(self : TimedVector, quality : Double) -> TimedVector

Replace the quality without changing the vector.

#
TrackLedger

pub struct TrackLedger {
entries : Array[TrackLedgerEntry]
capacity : Int
miss_limit : Int
evictions : Int
} derive(
Debug
)

A bounded in-memory registry for assignment results.

#
TrackLedger::active_entries

fn TrackLedger::active_entries(self : TrackLedger) -> Array[TrackLedgerEntry]

#
TrackLedger::capacity

fn TrackLedger::capacity(self : TrackLedger) -> Int

#
TrackLedger::ensure

fn TrackLedger::ensure(self : TrackLedger, id : Int) -> TrackLedgerEntry

#
TrackLedger::entries

#
TrackLedger::evictions

fn TrackLedger::evictions(self : TrackLedger) -> Int

#
TrackLedger::find

fn TrackLedger::find(self : TrackLedger, id : Int) -> TrackLedgerEntry?

#
TrackLedger::inactive_entries

fn TrackLedger::inactive_entries(self : TrackLedger) -> Array[TrackLedgerEntry]

#
TrackLedger::length

fn TrackLedger::length(self : TrackLedger) -> Int

#
TrackLedger::new

fn TrackLedger::new(capacity : Int, miss_limit : Int) -> TrackLedger

#
TrackLedger::observe

fn TrackLedger::observe(self : TrackLedger, timestamp : Int, decisions : Array[AssociationDecision]) -> Unit

#
TrackLedger::remove_inactive

fn TrackLedger::remove_inactive(self : TrackLedger) -> Int

#
TrackLedgerEntry

pub struct TrackLedgerEntry {
id : Int
hits : Int
misses : Int
age : Int
score : Double
last_timestamp : Int?
last_measurement : Int?
active : Bool
} derive(
Debug
)

A stable track identity with lifecycle counters and quality history.

#
TrackLedgerEntry::active

fn TrackLedgerEntry::active(self : TrackLedgerEntry) -> Bool

#
TrackLedgerEntry::age

fn TrackLedgerEntry::age(self : TrackLedgerEntry) -> Int

#
TrackLedgerEntry::hits

fn TrackLedgerEntry::hits(self : TrackLedgerEntry) -> Int

#
TrackLedgerEntry::id

fn TrackLedgerEntry::id(self : TrackLedgerEntry) -> Int

#
TrackLedgerEntry::last_measurement

fn TrackLedgerEntry::last_measurement(self : TrackLedgerEntry) -> Int?

#
TrackLedgerEntry::last_timestamp

fn TrackLedgerEntry::last_timestamp(self : TrackLedgerEntry) -> Int?

#
TrackLedgerEntry::misses

fn TrackLedgerEntry::misses(self : TrackLedgerEntry) -> Int

#
TrackLedgerEntry::new

fn TrackLedgerEntry::new(id : Int) -> TrackLedgerEntry

#
TrackLedgerEntry::observe

fn TrackLedgerEntry::observe(self : TrackLedgerEntry, timestamp : Int, measurement_id : Int?, confidence : Double, miss_limit : Int) -> Unit

#
TrackLedgerEntry::reactivate

fn TrackLedgerEntry::reactivate(self : TrackLedgerEntry) -> Unit

#
TrackLedgerEntry::score

fn TrackLedgerEntry::score(self : TrackLedgerEntry) -> Double

#
TrackLifecycle

pub(all) enum TrackLifecycle {
Tentative
Confirmed
Lost
Deleted
} derive(Eq,
Debug
)

Estimate lifecycle used by a tracker manager.

#
TrackManager

pub struct TrackManager {
lifecycle : TrackLifecycle
confirmation_hits : Int
deletion_misses : Int
hits : Int
misses : Int
age : Int
}

#
TrackManager::age

fn TrackManager::age(self : TrackManager) -> Int

#
TrackManager::hits

fn TrackManager::hits(self : TrackManager) -> Int

#
TrackManager::lifecycle

fn TrackManager::lifecycle(self : TrackManager) -> TrackLifecycle

#
TrackManager::misses

fn TrackManager::misses(self : TrackManager) -> Int

#
TrackManager::new

fn TrackManager::new(confirmation_hits : Int, deletion_misses : Int) -> TrackManager

#
TrackManager::observe

fn TrackManager::observe(self : TrackManager, result : UpdateResult) -> TrackLifecycle

#
TrackManager::reset

fn TrackManager::reset(self : TrackManager) -> Unit

#
TrajectoryBuffer

pub struct TrajectoryBuffer {
points : Array[TrajectoryPoint]
capacity : Int
rejected : Int
}

Bounded trajectory history with monotonic timestamp protection.

#
TrajectoryBuffer::capacity

fn TrajectoryBuffer::capacity(self : TrajectoryBuffer) -> Int

#
TrajectoryBuffer::clear

fn TrajectoryBuffer::clear(self : TrajectoryBuffer) -> Unit

#
TrajectoryBuffer::duration

fn TrajectoryBuffer::duration(self : TrajectoryBuffer) -> Int

#
TrajectoryBuffer::first

#
TrajectoryBuffer::last

#
TrajectoryBuffer::length

fn TrajectoryBuffer::length(self : TrajectoryBuffer) -> Int

#
TrajectoryBuffer::new

fn TrajectoryBuffer::new(capacity : Int) -> TrajectoryBuffer

#
TrajectoryBuffer::points

#
TrajectoryBuffer::push

fn TrajectoryBuffer::push(self : TrajectoryBuffer, point : TrajectoryPoint) -> Bool

#
TrajectoryBuffer::rejected

fn TrajectoryBuffer::rejected(self : TrajectoryBuffer) -> Int

#
TrajectoryEvent

pub struct TrajectoryEvent {
timestamp : Int
flag : TrajectoryQualityFlag
severity : Double
index : Int
message : String
} derive(
Debug
)

#
TrajectoryEvent::flag

#
TrajectoryEvent::index

fn TrajectoryEvent::index(self : TrajectoryEvent) -> Int

#
TrajectoryEvent::message

fn TrajectoryEvent::message(self : TrajectoryEvent) -> String

#
TrajectoryEvent::new

fn TrajectoryEvent::new(timestamp : Int, flag : TrajectoryQualityFlag, severity : Double, index : Int, message : String) -> TrajectoryEvent

#
TrajectoryEvent::severity

fn TrajectoryEvent::severity(self : TrajectoryEvent) -> Double

#
TrajectoryEvent::timestamp

fn TrajectoryEvent::timestamp(self : TrajectoryEvent) -> Int

#
TrajectoryInterval

pub struct TrajectoryInterval {
start_timestamp : Int
end_timestamp : Int
duration : Double
displacement : Double
speed : Double
acceleration : Double
jerk : Double
valid : Bool
} derive(
Debug
)

Kinematic statistics for one interval of a trajectory.

#
TrajectoryInterval::acceleration

fn TrajectoryInterval::acceleration(self : TrajectoryInterval) -> Double

#
TrajectoryInterval::displacement

fn TrajectoryInterval::displacement(self : TrajectoryInterval) -> Double

#
TrajectoryInterval::duration

fn TrajectoryInterval::duration(self : TrajectoryInterval) -> Double

#
TrajectoryInterval::end_timestamp

fn TrajectoryInterval::end_timestamp(self : TrajectoryInterval) -> Int

#
TrajectoryInterval::invalid

#
TrajectoryInterval::jerk

fn TrajectoryInterval::jerk(self : TrajectoryInterval) -> Double

#
TrajectoryInterval::speed

fn TrajectoryInterval::speed(self : TrajectoryInterval) -> Double

#
TrajectoryInterval::start_timestamp

fn TrajectoryInterval::start_timestamp(self : TrajectoryInterval) -> Int

#
TrajectoryInterval::valid

fn TrajectoryInterval::valid(self : TrajectoryInterval) -> Bool

#
TrajectoryPoint

pub struct TrajectoryPoint {
timestamp : Int
position : Array[Double]
velocity : Array[Double]
covariance : Matrix
} derive(
Debug
)

A timestamped state used by offline analysis and path-quality metrics.

#
TrajectoryPoint::covariance

fn TrajectoryPoint::covariance(self : TrajectoryPoint) -> Matrix

#
TrajectoryPoint::dimension

fn TrajectoryPoint::dimension(self : TrajectoryPoint) -> Int

#
TrajectoryPoint::is_valid

fn TrajectoryPoint::is_valid(self : TrajectoryPoint) -> Bool

#
TrajectoryPoint::new

fn TrajectoryPoint::new(timestamp : Int, position : Array[Double], velocity : Array[Double], covariance : Matrix) -> TrajectoryPoint

#
TrajectoryPoint::position

fn TrajectoryPoint::position(self : TrajectoryPoint) -> Array[Double]

#
TrajectoryPoint::timestamp

fn TrajectoryPoint::timestamp(self : TrajectoryPoint) -> Int

#
TrajectoryPoint::velocity

fn TrajectoryPoint::velocity(self : TrajectoryPoint) -> Array[Double]

#
TrajectoryQualityFlag

pub enum TrajectoryQualityFlag {
ValidTrajectory
EmptyTrajectory
InvalidPoint
NonMonotonicTime
LargeGap
SpeedLimitExceeded
AccelerationLimitExceeded
JerkLimitExceeded
UncertaintyTooLarge
} derive(Eq,
Debug
)

Quality flags emitted by trajectory validation.

#
TrajectoryQualityReport

pub struct TrajectoryQualityReport {
point_count : Int
valid_points : Int
interval_count : Int
valid_intervals : Int
total_length : Double
duration : Int
mean_speed : Double
max_speed : Double
max_acceleration : Double
max_jerk : Double
mean_uncertainty : Double
score : Double
events : Array[TrajectoryEvent]
} derive(
Debug
)

#
TrajectoryQualityReport::duration

#
TrajectoryQualityReport::empty

#
TrajectoryQualityReport::events

#
TrajectoryQualityReport::interval_count

fn TrajectoryQualityReport::interval_count(self : TrajectoryQualityReport) -> Int

#
TrajectoryQualityReport::is_usable

fn TrajectoryQualityReport::is_usable(self : TrajectoryQualityReport) -> Bool

#
TrajectoryQualityReport::max_acceleration

fn TrajectoryQualityReport::max_acceleration(self : TrajectoryQualityReport) -> Double

#
TrajectoryQualityReport::max_jerk

fn TrajectoryQualityReport::max_jerk(self : TrajectoryQualityReport) -> Double

#
TrajectoryQualityReport::max_speed

fn TrajectoryQualityReport::max_speed(self : TrajectoryQualityReport) -> Double

#
TrajectoryQualityReport::mean_speed

fn TrajectoryQualityReport::mean_speed(self : TrajectoryQualityReport) -> Double

#
TrajectoryQualityReport::mean_uncertainty

fn TrajectoryQualityReport::mean_uncertainty(self : TrajectoryQualityReport) -> Double

#
TrajectoryQualityReport::point_count

fn TrajectoryQualityReport::point_count(self : TrajectoryQualityReport) -> Int

#
TrajectoryQualityReport::score

#
TrajectoryQualityReport::total_length

fn TrajectoryQualityReport::total_length(self : TrajectoryQualityReport) -> Double

#
TrajectoryQualityReport::valid_intervals

fn TrajectoryQualityReport::valid_intervals(self : TrajectoryQualityReport) -> Int

#
TrajectoryQualityReport::valid_points

fn TrajectoryQualityReport::valid_points(self : TrajectoryQualityReport) -> Int

#
TrajectorySegment

pub struct TrajectorySegment {
start_index : Int
end_index : Int
start_timestamp : Int
end_timestamp : Int
length : Double
mean_speed : Double
max_speed : Double
max_acceleration : Double
max_jerk : Double
mean_uncertainty : Double
quality : Double
valid : Bool
} derive(
Debug
)

A contiguous segment annotated with kinematic and covariance quality.

#
TrajectorySegment::empty

#
TrajectorySegment::end_index

fn TrajectorySegment::end_index(self : TrajectorySegment) -> Int

#
TrajectorySegment::end_timestamp

fn TrajectorySegment::end_timestamp(self : TrajectorySegment) -> Int

#
TrajectorySegment::length

fn TrajectorySegment::length(self : TrajectorySegment) -> Double

#
TrajectorySegment::max_acceleration

fn TrajectorySegment::max_acceleration(self : TrajectorySegment) -> Double

#
TrajectorySegment::max_jerk

fn TrajectorySegment::max_jerk(self : TrajectorySegment) -> Double

#
TrajectorySegment::max_speed

fn TrajectorySegment::max_speed(self : TrajectorySegment) -> Double

#
TrajectorySegment::mean_speed

fn TrajectorySegment::mean_speed(self : TrajectorySegment) -> Double

#
TrajectorySegment::mean_uncertainty

fn TrajectorySegment::mean_uncertainty(self : TrajectorySegment) -> Double

#
TrajectorySegment::quality

fn TrajectorySegment::quality(self : TrajectorySegment) -> Double

#
TrajectorySegment::start_index

fn TrajectorySegment::start_index(self : TrajectorySegment) -> Int

#
TrajectorySegment::start_timestamp

fn TrajectorySegment::start_timestamp(self : TrajectorySegment) -> Int

#
TrajectorySegment::valid

fn TrajectorySegment::valid(self : TrajectorySegment) -> Bool

#
UKF

pub struct UKF {
x : Array[Double]
p : Matrix
q : Matrix
r : Matrix
initial_state : Array[Double]
initial_covariance : Matrix
alpha : Double
beta : Double
kappa : Double
predicted_sigma_points : Array[Array[Double]]
last_innovation : Array[Double]
last_innovation_covariance : Matrix
last_gain : Matrix
last_nis : Double
gate_threshold : Double
predict_count : Int
accepted_count : Int
rejected_count : Int
missing_count : Int
}

Unscented Kalman Filter using scaled sigma points.

UKF is useful when a model is smooth but its Jacobian is inconvenient to derive. The implementation falls back to diagonal spread when a noisy covariance is not Cholesky-decomposable, keeping an edge device alive while diagnostics can report the covariance issue separately.

#
UKF::accepted_count

fn UKF::accepted_count(self : UKF) -> Int

#
UKF::covariance

fn UKF::covariance(self : UKF) -> Matrix

#
UKF::filter

fn UKF::filter(self : UKF, measurements : Array[Array[Double]], f : (Array[Double]) -> Array[Double], h : (Array[Double]) -> Array[Double]) -> Array[Array[Double]]

#
UKF::gate_threshold

fn UKF::gate_threshold(self : UKF) -> Double

#
UKF::innovation

fn UKF::innovation(self : UKF) -> Array[Double]

#
UKF::innovation_covariance

fn UKF::innovation_covariance(self : UKF) -> Matrix

#
UKF::kalman_gain

fn UKF::kalman_gain(self : UKF) -> Matrix

#
UKF::missing_count

fn UKF::missing_count(self : UKF) -> Int

#
UKF::new

fn UKF::new(initial_state : Array[Double], initial_covariance : Array[Array[Double]], process_noise : Array[Array[Double]], measurement_noise : Array[Array[Double]]) -> UKF

#
UKF::normalized_innovation_squared

fn UKF::normalized_innovation_squared(self : UKF) -> Double

#
UKF::parameters

fn UKF::parameters(self : UKF) -> (Double, Double, Double)

#
UKF::predict

fn UKF::predict(self : UKF, f : (Array[Double]) -> Array[Double]) -> Unit

#
UKF::predict_count

fn UKF::predict_count(self : UKF) -> Int

#
UKF::predict_with_control

fn UKF::predict_with_control(self : UKF, f : (Array[Double], Array[Double]) -> Array[Double], control : Array[Double]) -> Unit

#
UKF::rejected_count

fn UKF::rejected_count(self : UKF) -> Int

#
UKF::reset

fn UKF::reset(self : UKF) -> Unit

#
UKF::set_gate_threshold

fn UKF::set_gate_threshold(self : UKF, threshold : Double) -> Unit

#
UKF::set_parameters

fn UKF::set_parameters(self : UKF, alpha : Double, beta : Double, kappa : Double) -> Unit

#
UKF::state

fn UKF::state(self : UKF) -> Array[Double]

#
UKF::update

fn UKF::update(self : UKF, z : Array[Double], h : (Array[Double]) -> Array[Double]) -> UpdateResult

#
UKF::update_gated

fn UKF::update_gated(self : UKF, z : Array[Double], h : (Array[Double]) -> Array[Double], threshold : Double) -> UpdateResult

#
UKF::update_missing

fn UKF::update_missing(self : UKF) -> UpdateResult

#
UncertaintyBox3D

pub struct UncertaintyBox3D {
center : Vec3D
half_width : Vec3D
confidence : Double
} derive(
Debug
)

An axis-aligned uncertainty region for a 3D position.

#
UncertaintyBox3D::center

Return center.

#
UncertaintyBox3D::confidence

fn UncertaintyBox3D::confidence(self : UncertaintyBox3D) -> Double

Return confidence multiplier.

#
UncertaintyBox3D::contains

fn UncertaintyBox3D::contains(self : UncertaintyBox3D, point : Vec3D) -> Bool

Return whether a point is inside.

#
UncertaintyBox3D::from_half_width

fn UncertaintyBox3D::from_half_width(center : Vec3D, half_width : Vec3D, confidence : Double) -> UncertaintyBox3D

Construct a 3D box directly from half widths.

#
UncertaintyBox3D::half_width

fn UncertaintyBox3D::half_width(self : UncertaintyBox3D) -> Vec3D

Return half widths.

#
UncertaintyBox3D::inflate

fn UncertaintyBox3D::inflate(self : UncertaintyBox3D, factor : Double) -> UncertaintyBox3D

Inflate a box by a non-negative factor.

#
UncertaintyBox3D::lower

Return lower corner.

#
UncertaintyBox3D::new

fn UncertaintyBox3D::new(center : Vec3D, standard_deviations : Vec3D, multiplier : Double) -> UncertaintyBox3D

Construct a 3D uncertainty box from standard deviations.

#
UncertaintyBox3D::upper

Return upper corner.

#
UncertaintyBox3D::volume

fn UncertaintyBox3D::volume(self : UncertaintyBox3D) -> Double

Return volume.

#
UncertaintyBudget

pub struct UncertaintyBudget {
contributions : Array[UncertaintyContribution]
total_variance : Double
total_standard_deviation : Double
} derive(
Debug
)

An uncertainty budget accumulated from independent contributions.

#
UncertaintyBudget::add

fn UncertaintyBudget::add(self : UncertaintyBudget, contribution : UncertaintyContribution) -> Unit

Add a contribution and recalculate fractions.

#
UncertaintyBudget::clear

fn UncertaintyBudget::clear(self : UncertaintyBudget) -> Unit

Remove all contributions.

#
UncertaintyBudget::contributions

Return a copy of contributions.

#
UncertaintyBudget::dominant

Return the largest active contribution.

#
UncertaintyBudget::find

fn UncertaintyBudget::find(self : UncertaintyBudget, name : String) -> UncertaintyContribution?

Return a budget contribution by name.

#
UncertaintyBudget::new

Construct an empty budget.

#
UncertaintyBudget::recalculate

fn UncertaintyBudget::recalculate(self : UncertaintyBudget) -> Unit

Recalculate total variance and fractions.

#
UncertaintyBudget::total_standard_deviation

fn UncertaintyBudget::total_standard_deviation(self : UncertaintyBudget) -> Double

Return total standard deviation.

#
UncertaintyBudget::total_variance

fn UncertaintyBudget::total_variance(self : UncertaintyBudget) -> Double

Return total variance.

#
UncertaintyContribution

pub struct UncertaintyContribution {
name : String
variance : Double
fraction : Double
enabled : Bool
} derive(
Debug
)

A named uncertainty contribution for a budget review.

#
UncertaintyContribution::enabled

Return enabled flag.

#
UncertaintyContribution::fraction

fn UncertaintyContribution::fraction(self : UncertaintyContribution) -> Double

Return normalized fraction.

#
UncertaintyContribution::name

Return name.

#
UncertaintyContribution::new

fn UncertaintyContribution::new(name : String, variance : Double, enabled : Bool) -> UncertaintyContribution

Construct a contribution.

#
UncertaintyContribution::variance

fn UncertaintyContribution::variance(self : UncertaintyContribution) -> Double

Return variance.

#
UpdateResult

pub(all) enum UpdateResult {
Accepted
RejectedByGate
InvalidMeasurement
SingularInnovation
MissingMeasurement
} derive(Eq,
Debug
)

Result of a measurement update.

#
UpdateSummary

pub struct UpdateSummary {
result : UpdateResult
innovation : Array[Double]
innovation_covariance : Matrix
normalized_innovation_squared : Double
} derive(
Debug
)

A compact record of the latest update, useful for telemetry and debugging.

#
UpdateSummary::innovation

fn UpdateSummary::innovation(self : UpdateSummary) -> Array[Double]

#
UpdateSummary::innovation_covariance

fn UpdateSummary::innovation_covariance(self : UpdateSummary) -> Matrix

#
UpdateSummary::nis

fn UpdateSummary::nis(self : UpdateSummary) -> Double

#
UpdateSummary::result

#
ValidationReport

pub struct ValidationReport {
name : String
checks : Int
passed : Int
issues : Array[ContractIssue]
}

#
ValidationReport::check

fn ValidationReport::check(self : ValidationReport, code : String, condition : Bool, severity : ContractSeverity, message : String) -> Bool

#
ValidationReport::checks

fn ValidationReport::checks(self : ValidationReport) -> Int

#
ValidationReport::failed

fn ValidationReport::failed(self : ValidationReport) -> Int

#
ValidationReport::is_valid

fn ValidationReport::is_valid(self : ValidationReport) -> Bool

#
ValidationReport::issues

#
ValidationReport::name

fn ValidationReport::name(self : ValidationReport) -> String

#
ValidationReport::new

fn ValidationReport::new(name : String) -> ValidationReport

#
ValidationReport::passed

fn ValidationReport::passed(self : ValidationReport) -> Int

#
ValidationReport::reset

fn ValidationReport::reset(self : ValidationReport) -> Unit

#
ValidationReport::score

fn ValidationReport::score(self : ValidationReport) -> Double

#
Vec3D

pub struct Vec3D {
x : Double
y : Double
z : Double
} derive(
Debug
)

A finite three-dimensional vector used for sensor-frame and world-frame calculations. The type is deliberately small and immutable from callers; every arithmetic method returns a new value.

#
Vec3D::add

fn Vec3D::add(self : Vec3D, other : Vec3D) -> Vec3D

Add two vectors.

#
Vec3D::clamp

fn Vec3D::clamp(self : Vec3D, lower : Double, upper : Double) -> Vec3D

Clamp each component to the same interval.

#
Vec3D::cross

fn Vec3D::cross(self : Vec3D, other : Vec3D) -> Vec3D

Compute the cross product.

#
Vec3D::distance

fn Vec3D::distance(self : Vec3D, other : Vec3D) -> Double

Return the distance between two points.

#
Vec3D::dot

fn Vec3D::dot(self : Vec3D, other : Vec3D) -> Double

Compute the dot product.

#
Vec3D::hadamard

fn Vec3D::hadamard(self : Vec3D, other : Vec3D) -> Vec3D

Multiply components pairwise.

#
Vec3D::is_finite

fn Vec3D::is_finite(self : Vec3D) -> Bool

Return whether all components are finite.

#
Vec3D::lerp

fn Vec3D::lerp(self : Vec3D, other : Vec3D, amount : Double) -> Vec3D

Linearly interpolate two vectors.

#
Vec3D::max_abs

fn Vec3D::max_abs(self : Vec3D) -> Double

Return the largest absolute component.

#
Vec3D::negate

fn Vec3D::negate(self : Vec3D) -> Vec3D

Negate a vector.

#
Vec3D::new

fn Vec3D::new(x : Double, y : Double, z : Double) -> Vec3D

Construct a three-dimensional vector.

#
Vec3D::norm

fn Vec3D::norm(self : Vec3D) -> Double

Return the Euclidean norm.

#
Vec3D::norm_squared

fn Vec3D::norm_squared(self : Vec3D) -> Double

Return the squared Euclidean norm.

#
Vec3D::normalize

fn Vec3D::normalize(self : Vec3D) -> Vec3D?

Normalize the vector, returning None for a zero or non-finite vector.

#
Vec3D::project

fn Vec3D::project(self : Vec3D, direction : Vec3D) -> Vec3D

Project this vector onto a direction. A zero direction produces zero.

#
Vec3D::reflect

fn Vec3D::reflect(self : Vec3D, normal : Vec3D) -> Vec3D

Reflect a vector across a plane normal.

#
Vec3D::reject

fn Vec3D::reject(self : Vec3D, direction : Vec3D) -> Vec3D

Remove the component parallel to a direction.

#
Vec3D::scale

fn Vec3D::scale(self : Vec3D, factor : Double) -> Vec3D

Scale a vector.

#
Vec3D::sub

fn Vec3D::sub(self : Vec3D, other : Vec3D) -> Vec3D

Subtract two vectors.

#
Vec3D::to_array

fn Vec3D::to_array(self : Vec3D) -> Array[Double]

Convert to an owned array in x/y/z order.

#
Vec3D::x

fn Vec3D::x(self : Vec3D) -> Double

Return the x component.

#
Vec3D::y

fn Vec3D::y(self : Vec3D) -> Double

Return the y component.

#
Vec3D::z

fn Vec3D::z(self : Vec3D) -> Double

Return the z component.

#
VectorAccumulator

pub struct VectorAccumulator {
dimension : Int
count : Int
mean : Array[Double]
scatter : Matrix
}

Online vector statistics using a numerically stable rank-one update.

#
VectorAccumulator::add

fn VectorAccumulator::add(self : VectorAccumulator, sample : Array[Double]) -> Bool

#
VectorAccumulator::count

fn VectorAccumulator::count(self : VectorAccumulator) -> Int

#
VectorAccumulator::covariance

fn VectorAccumulator::covariance(self : VectorAccumulator) -> Matrix

#
VectorAccumulator::dimension

fn VectorAccumulator::dimension(self : VectorAccumulator) -> Int

#
VectorAccumulator::mean

fn VectorAccumulator::mean(self : VectorAccumulator) -> Array[Double]

#
VectorAccumulator::new

fn VectorAccumulator::new(dimension : Int) -> VectorAccumulator

#
VectorAccumulator::reset

fn VectorAccumulator::reset(self : VectorAccumulator) -> Unit

#
VectorAccumulator::standard_deviation

fn VectorAccumulator::standard_deviation(self : VectorAccumulator) -> Array[Double]

#
VectorConfidenceBand

pub struct VectorConfidenceBand {
estimates : Array[Double]
lower : Array[Double]
upper : Array[Double]
standard_deviations : Array[Double]
multiplier : Double
valid : Bool
} derive(
Debug
)

A component-wise confidence band for a vector state.

#
VectorConfidenceBand::contains

fn VectorConfidenceBand::contains(self : VectorConfidenceBand, value : Array[Double]) -> Bool

Return whether a vector lies inside component-wise bounds.

#
VectorConfidenceBand::dimension

fn VectorConfidenceBand::dimension(self : VectorConfidenceBand) -> Int

Return state dimension.

#
VectorConfidenceBand::estimates

fn VectorConfidenceBand::estimates(self : VectorConfidenceBand) -> Array[Double]

Return estimates.

#
VectorConfidenceBand::lower

fn VectorConfidenceBand::lower(self : VectorConfidenceBand) -> Array[Double]

Return lower bounds.

#
VectorConfidenceBand::multiplier

fn VectorConfidenceBand::multiplier(self : VectorConfidenceBand) -> Double

Return multiplier.

#
VectorConfidenceBand::new

fn VectorConfidenceBand::new(estimates : Array[Double], covariance : Matrix, multiplier : Double) -> VectorConfidenceBand

Construct a vector confidence band from a covariance diagonal.

#
VectorConfidenceBand::standard_deviations

fn VectorConfidenceBand::standard_deviations(self : VectorConfidenceBand) -> Array[Double]

Return component deviations.

#
VectorConfidenceBand::upper

fn VectorConfidenceBand::upper(self : VectorConfidenceBand) -> Array[Double]

Return upper bounds.

#
VectorConfidenceBand::valid

fn VectorConfidenceBand::valid(self : VectorConfidenceBand) -> Bool

Return validity.

#
WeightedAccumulator

pub struct WeightedAccumulator {
dimension : Int
total_weight : Double
weighted_sum : Array[Double]
}

A weighted mean useful for blending calibrated sensor channels.

#
WeightedAccumulator::add

fn WeightedAccumulator::add(self : WeightedAccumulator, value : Array[Double], weight : Double) -> Bool

#
WeightedAccumulator::dimension

fn WeightedAccumulator::dimension(self : WeightedAccumulator) -> Int

#
WeightedAccumulator::mean

fn WeightedAccumulator::mean(self : WeightedAccumulator) -> Array[Double]

#
WeightedAccumulator::new

fn WeightedAccumulator::new(dimension : Int) -> WeightedAccumulator

#
WeightedAccumulator::reset

fn WeightedAccumulator::reset(self : WeightedAccumulator) -> Unit

#
WeightedAccumulator::weight

fn WeightedAccumulator::weight(self : WeightedAccumulator) -> Double

#
acceleration_observation

fn acceleration_observation(dimensions : Int, component : Int) -> Matrix

Observe position, velocity, or both from a constant-acceleration state.

#
align_timed_vectors

fn align_timed_vectors(samples : Array[TimedVector], timestamps : Array[Int], policy : AlignmentPolicy) -> (Array[AlignedVector], AlignmentReport)

Align a series to an explicit timestamp grid.

#
alignment_quality_score

fn alignment_quality_score(report : AlignmentReport, average_quality : Double, distance_limit : Int) -> Double

Compute an alignment score combining coverage, quality, and distance.

#
angle_difference

fn angle_difference(target : Double, source : Double) -> Double

#
assess_packet

fn assess_packet(packet : ObservationPacket, minimum_finite_fraction : Double) -> PacketQuality

#
assess_sensor_samples

fn assess_sensor_samples(samples : Array[SensorSample]) -> DataQualityReport

#
assess_trajectory_quality

fn assess_trajectory_quality(points : Array[TrajectoryPoint], max_gap : Int, max_speed_limit : Double, max_acceleration_limit : Double, max_jerk_limit : Double, uncertainty_limit : Double) -> TrajectoryQualityReport

#
associate_candidates

fn associate_candidates(track_ids : Array[Int], measurement_ids : Array[Int], candidates : Array[AssociationCandidate], config : AssociationConfig) -> AssociationBatch

Greedy global assignment with deterministic tie breaking.

#
associate_vectors

fn associate_vectors(track_ids : Array[Int], measurement_ids : Array[Int], predictions : Array[Array[Double]], observations : Array[Array[Double]], variances : Array[Double], config : AssociationConfig) -> AssociationBatch

#
association_batch_quality

fn association_batch_quality(batch : AssociationBatch) -> Double

Return a normalized quality score for a batch.

#
association_batch_summary

fn association_batch_summary(batch : AssociationBatch) -> String

#
association_candidate_from_vectors

fn association_candidate_from_vectors(track_id : Int, measurement_id : Int, expected : Array[Double], observed : Array[Double], variances : Array[Double], config : AssociationConfig) -> AssociationCandidate

#
association_candidate_summary

fn association_candidate_summary(candidate : AssociationCandidate) -> String

#
association_confidence_margin

fn association_confidence_margin(best : AssociationCandidate, second : AssociationCandidate?) -> Double

#
association_euclidean_distance

fn association_euclidean_distance(expected : Array[Double], observed : Array[Double]) -> Double

Calculate a bounded Euclidean distance.

#
association_gate_probability

fn association_gate_probability(distance : Double, threshold : Double) -> Double

#
association_likelihood

fn association_likelihood(distance : Double, scale : Double) -> Double

Convert a distance into a soft likelihood.

#
association_mahalanobis_distance

fn association_mahalanobis_distance(expected : Array[Double], observed : Array[Double], variances : Array[Double]) -> Double

Calculate a diagonal Mahalanobis distance with safe variances.

#
association_pairwise_candidates

fn association_pairwise_candidates(track_ids : Array[Int], measurement_ids : Array[Int], predictions : Array[Array[Double]], observations : Array[Array[Double]], variances : Array[Double], config : AssociationConfig) -> Array[AssociationCandidate]

Build all pairwise candidates for vector-valued tracks.

#
association_validate_ids

fn association_validate_ids(track_ids : Array[Int], measurement_ids : Array[Int]) -> Bool

#
attenuate_timed_vector_quality

fn attenuate_timed_vector_quality(samples : Array[TimedVector], reference : Int, time_constant : Double) -> Array[TimedVector]

Return a stream with quality attenuated by timestamp distance from a reference time. This is useful when delayed samples should be retained but contribute less to a fusion policy.

#
average_pose3d

fn average_pose3d(poses : Array[Pose3D]) -> Pose3D?

Average a sequence of poses using translation averaging and quaternion component averaging with sign correction.

#
batch_aic

fn batch_aic(fit : BatchFitResult) -> Double

Compute AIC for a batch fit.

#
batch_bic

fn batch_bic(fit : BatchFitResult) -> Double

Compute BIC for a batch fit.

#
batch_design_matrix

fn batch_design_matrix(observations : Array[BatchObservation]) -> (Matrix, Array[Double], Array[Double])

Build a design matrix from observations, retaining only consistent rows.

#
batch_error_metrics

fn batch_error_metrics(actual : Array[Double], predicted : Array[Double]) -> (Double, Double)

Compute RMSE and MAE.

#
batch_feature_dimension

fn batch_feature_dimension(observations : Array[BatchObservation]) -> Int

Infer the feature dimension from the first valid observation.

#
batch_fit_is_usable

fn batch_fit_is_usable(fit : BatchFitResult, maximum_condition : Double, maximum_rmse : Double) -> Bool

Return whether a batch fit meets numerical quality limits.

#
batch_fit_summary

fn batch_fit_summary(fit : BatchFitResult) -> String

Return a compact report line for a batch fit.

#
batch_influence_scores

fn batch_influence_scores(residuals : Array[Double], leverage : Array[Double], mse : Double) -> Array[Double]

Return Cook-like influence scores from residuals and leverage.

#
batch_leverage

fn batch_leverage(design : Matrix, regularization : Double) -> Array[Double]

Compute leverage values from a design matrix using a regularized inverse.

#
batch_normal_equations

fn batch_normal_equations(design : Matrix, values : Array[Double], weights : Array[Double]) -> (Matrix, Array[Double])

Form weighted normal equations X'WX and X'Wy.

#
batch_polynomial_fit

fn batch_polynomial_fit(x : Array[Double], y : Array[Double], degree : Int, center : Double, scale : Double) -> BatchFitResult

Fit a polynomial model using normalized powers.

#
batch_prediction_interval

fn batch_prediction_interval(fit : BatchFitResult, prediction : Double, confidence_scale : Double) -> (Double, Double)

Return an interval around a predicted value.

#
batch_prediction_radius

fn batch_prediction_radius(fit : BatchFitResult, confidence_scale : Double) -> Double

Compute a prediction interval radius from fit error and confidence scale.

#
batch_predictions

fn batch_predictions(design : Matrix, coefficients : Array[Double]) -> Array[Double]

Compute predictions from a design matrix and coefficient vector.

#
batch_r_squared

fn batch_r_squared(actual : Array[Double], predicted : Array[Double]) -> Double

Compute coefficient of determination.

#
batch_residual_median

fn batch_residual_median(residuals : Array[Double], weights : Array[Double]) -> Double

Compute a weighted residual median for regression diagnostics.

#
batch_residuals

fn batch_residuals(design : Matrix, values : Array[Double], coefficients : Array[Double]) -> Array[Double]

Compute residuals from design, observations, and coefficients.

#
batch_robust_fit

fn batch_robust_fit(observations : Array[BatchObservation], config : RobustEstimatorConfig) -> BatchFitResult

Return a robust batch fit by iteratively updating observation weights.

#
batch_weighted_least_squares

fn batch_weighted_least_squares(observations : Array[BatchObservation], regularization : Double) -> BatchFitResult

Solve a weighted linear least-squares problem with diagonal regularization.

#
batch_weighted_line_fit

fn batch_weighted_line_fit(x : Array[Double], y : Array[Double], weights : Array[Double]) -> BatchFitResult

Fit an intercept and one scalar feature.

#
batch_weighted_mean_fit

fn batch_weighted_mean_fit(values : Array[Double], weights : Array[Double]) -> BatchFitResult

Fit an intercept-only weighted model.

#
calibrate_scalar

fn calibrate_scalar(measurements : Array[Double], expected : Array[Double], spacing : Double, minimum_noise : Double) -> ScalarCalibration

#
candidate_from_filter

fn candidate_from_filter(name : String, filter : KalmanND, result : UpdateResult, confidence : Double) -> StateCandidate

#
candidate_from_scalar

fn candidate_from_scalar(name : String, filter : Kalman1D, result : UpdateResult, confidence : Double) -> StateCandidate

#
check_safety_constraint

fn check_safety_constraint(constraint : SafetyConstraint, value : Double, timestamp : Int?) -> SafetyCheckResult

#
clamp_state_to_bounds

fn clamp_state_to_bounds(state : Array[Double], lower : Array[Double], upper : Array[Double]) -> Array[Double]

#
classify_residual_vector

fn classify_residual_vector(policy : ResidualPolicy, residual : Array[Double]) -> ResidualAction

Apply a scalar policy to a residual vector. The smallest component weight is used for the complete observation, which is conservative for correlated sensors and avoids accidentally trusting a partially corrupted packet.

#
clip_residual_vector

fn clip_residual_vector(values : Array[Double], threshold : Double) -> Array[Double]

Apply symmetric clipping to a vector.

#
combine_independent_estimates

fn combine_independent_estimates(estimates : Array[Double], variances : Array[Double]) -> ConfidenceBand

Combine scalar estimates using inverse-variance weights.

#
combine_independent_variances

fn combine_independent_variances(variances : Array[Double]) -> Double

Combine independent covariance estimates using precision weighting.

#
combine_validation_reports

fn combine_validation_reports(name : String, reports : Array[ValidationReport]) -> ValidationReport

#
compare_filter_quality

fn compare_filter_quality(left : Double, right : Double) -> Int

#
compare_model_scores

fn compare_model_scores(left : ModelScore, right : ModelScore, penalty : Double) -> Int

#
compare_uncertainty_covariances

fn compare_uncertainty_covariances(left : Matrix, right : Matrix) -> Int

Compare two covariance matrices by trace and condition.

#
confidence_band_from_variance

fn confidence_band_from_variance(estimate : Double, variance : Double, multiplier : Double) -> ConfidenceBand

Construct a band from a variance.

#
confidence_coverage

fn confidence_coverage(bands : Array[ConfidenceBand], values : Array[Double]) -> Double

Return the fraction of a reference state covered by bands.

#
confidence_coverage_score

fn confidence_coverage_score(coverages : Array[Double], target : Double) -> Double

Return a confidence level score from repeated truth coverage.

#
constant_acceleration_process_noise

fn constant_acceleration_process_noise(dimensions : Int, dt : Double, jerk_variance : Double) -> Matrix

#
constant_acceleration_transition

fn constant_acceleration_transition(dimensions : Int, dt : Double) -> Matrix

Constant-acceleration transition for each independent axis. State order is [position, velocity, acceleration] repeated by axis.

#
constant_jerk_process_noise

fn constant_jerk_process_noise(dimensions : Int, dt : Double, snap_variance : Double) -> Matrix

#
constant_jerk_transition

fn constant_jerk_transition(dimensions : Int, dt : Double) -> Matrix

Constant-jerk model with state [position, velocity, acceleration, jerk] per axis for highly dynamic motion.

#
constant_velocity_model

fn constant_velocity_model(dimensions : Int, dt : Double, acceleration_variance : Double, measurement_variance : Double) -> LinearModel

Build a usable constant-velocity model for a position sensor.

#
constant_velocity_process_noise

fn constant_velocity_process_noise(dimensions : Int, dt : Double, acceleration_variance : Double) -> Matrix

White-acceleration process noise for the constant-velocity model.

#
constant_velocity_transition

fn constant_velocity_transition(dimensions : Int, dt : Double) -> Matrix

Constant-velocity transition for dimensions independent axes. State order is [position_0..position_n, velocity_0..velocity_n].

#
control_energy

fn control_energy(commands : Array[ControlCommand]) -> Double

#
control_interpolate

fn control_interpolate(left : ControlCommand, right : ControlCommand, timestamp : Int) -> ControlCommand

#
control_peak

fn control_peak(commands : Array[ControlCommand]) -> Double

#
control_schedule_energy

fn control_schedule_energy(sequence : ControlSequence) -> Double

#
control_schedule_peak

fn control_schedule_peak(sequence : ControlSequence) -> Double

#
correct_sensor_clock

fn correct_sensor_clock(samples : Array[TimedVector], fit : SensorClockFit) -> Array[TimedVector]

Apply a clock fit to a timestamped series.

#
correct_sensor_clock_values

fn correct_sensor_clock_values(samples : Array[TimedVector], fit : SensorClockFit) -> Array[TimedVector]

Correct a series using the clock fit while retaining vector and quality.

#
covariance_average_variance

fn covariance_average_variance(covariance : Matrix) -> Double

#
covariance_is_positive_definite

fn covariance_is_positive_definite(covariance : Matrix, tolerance : Double) -> Bool

#
covariance_is_psd

fn covariance_is_psd(covariance : Matrix, tolerance : Double) -> Bool

Return whether a matrix is symmetric positive semidefinite within a caller-supplied tolerance.

#
covariance_project_psd

fn covariance_project_psd(covariance : Matrix, floor : Double) -> Matrix

#
covariance_relative_change

fn covariance_relative_change(previous : Matrix, current : Matrix) -> Double

#
covariance_standard_deviations

fn covariance_standard_deviations(covariance : Matrix) -> Array[Double]

Compute per-component standard deviations from covariance.

#
covariance_to_markdown

fn covariance_to_markdown(covariance : Matrix, digits? : Int) -> String

#
covariance_trace

fn covariance_trace(covariance : Matrix) -> Double

#
covariance_trace3d

fn covariance_trace3d(covariance : Matrix) -> Double

Return the trace of a 3D covariance matrix.

#
covariance_trace_decreased

fn covariance_trace_decreased(before : Matrix, after : Matrix, tolerance : Double) -> Bool

Return whether a covariance update is monotonic in trace.

#
covariance_uncertainty_score

fn covariance_uncertainty_score(covariance : Matrix, scale : Double) -> Double

Return a normalized uncertainty score where zero is best.

#
decimate

fn decimate(values : Array[Double], factor : Int) -> Array[Double]

#
deduplicate_timed_vectors

fn deduplicate_timed_vectors(samples : Array[TimedVector]) -> Array[TimedVector]

Remove duplicate timestamps, retaining the higher quality sample.

#
detect_spikes

fn detect_spikes(values : Array[Double], threshold : Double, radius : Int) -> Array[Bool]

#
diagnostic_covariance_health

fn diagnostic_covariance_health(covariance : Matrix, tolerance : Double) -> Double

#
diagnostic_event_counts

fn diagnostic_event_counts(events : Array[DiagnosticEvent]) -> Array[(DiagnosticSeverity, Int)]

#
diagnostic_field_from_covariance

fn diagnostic_field_from_covariance(name : String, covariance : Matrix, unit : String) -> DiagnosticField

#
diagnostic_field_from_state

fn diagnostic_field_from_state(name : String, state : Array[Double], unit : String, index : Int, minimum : Double, maximum : Double) -> DiagnosticField

#
diagnostic_merge_reports

fn diagnostic_merge_reports(left : DiagnosticReport, right : DiagnosticReport, run_id : String) -> DiagnosticReport

#
diagnostic_report_from_quality

fn diagnostic_report_from_quality(run_id : String, timestamp : Int, report : TrajectoryQualityReport) -> DiagnosticReport

#
diagnostic_score_fields

fn diagnostic_score_fields(fields : Array[DiagnosticField]) -> Double

#
diagnostic_snapshot_from_filter

fn diagnostic_snapshot_from_filter(timestamp : Int, source : String, state : Array[Double], covariance : Matrix) -> DiagnosticSnapshot

#
diagnostic_snapshot_summary

fn diagnostic_snapshot_summary(snapshot : DiagnosticSnapshot) -> String

#
diagnostic_value_within

fn diagnostic_value_within(value : Double, minimum : Double, maximum : Double) -> Bool

#
diagonal_covariance3d

fn diagonal_covariance3d(deviations : Vec3D) -> Matrix

Build a diagonal covariance matrix from component standard deviations.

#
diagonal_mahalanobis3d

fn diagonal_mahalanobis3d(residual : Vec3D, standard_deviation : Vec3D) -> Double

Compute a Mahalanobis-like diagonal distance for a 3D residual.

#
empty_batch_fit

fn empty_batch_fit(parameter_count : Int) -> BatchFitResult

Return a zero-valued failed fit.

#
ensemble_quality

fn ensemble_quality(ensemble : EstimatorEnsemble) -> Double

#
estimate_noise

fn estimate_noise(measurements : Array[Double], expected : Array[Double]) -> NoiseEstimate

#
estimate_process_noise

fn estimate_process_noise(states : Array[Double], spacing : Double) -> NoiseEstimate

#
estimate_stream_lag

fn estimate_stream_lag(source : Array[TimedVector], reference : Array[TimedVector], candidate_lags : Array[Int], policy : AlignmentPolicy) -> Int

Estimate a constant lag by minimizing nearest-neighbor squared error.

#
estimates_to_csv

fn estimates_to_csv(estimates : Array[Array[Double]], truth : Array[Array[Double]]) -> String

#
evaluate_consistency

fn evaluate_consistency(estimates : Array[Array[Double]], truth : Array[Array[Double]], covariances : Array[Matrix], innovations : Array[Array[Double]], innovation_covariances : Array[Matrix], accepted : Array[Bool]) -> ConsistencyReport

#
evaluate_errors

fn evaluate_errors(actual : Array[Array[Double]], expected : Array[Array[Double]]) -> ErrorMetrics

#
evaluate_polynomial

fn evaluate_polynomial(coefficients : Array[Double], x : Double, center : Double, scale : Double) -> Double

Evaluate a fitted polynomial at x.

#
exponential_smooth

fn exponential_smooth(values : Array[Double], factor : Double) -> Array[Double]

#
extract_features

fn extract_features(values : Array[Double], spacing : Double) -> FeatureVector

#
extrapolate_trajectory_point

fn extrapolate_trajectory_point(point : TrajectoryPoint, seconds : Double) -> TrajectoryPoint

Constant-acceleration extrapolation of one point.

#
filter_quality_score

fn filter_quality_score(metrics : ErrorMetrics, rejected : Int, covariance_failures : Int) -> Double

A simple score for comparing two filter runs. Lower is better; rejected observations and covariance failures are penalized separately.

#
filter_timed_vectors

fn filter_timed_vectors(samples : Array[TimedVector], minimum_quality : Double) -> Array[TimedVector]

Return only valid samples above a quality threshold.

#
fit_sensor_clock

fn fit_sensor_clock(local_timestamps : Array[Int], reference_timestamps : Array[Int]) -> SensorClockFit

Estimate a linear clock correction from paired local and reference times.

#
fit_time_series_trend

fn fit_time_series_trend(timestamps : Array[Int], values : Array[Double]) -> BatchFitResult

Fit a trend to a timestamped scalar stream.

#
fuse_measurements

fn fuse_measurements(measurements : Array[FusionMeasurement], strategy : FusionStrategy, covariance_floor : Double) -> FusionResult

#
fusion_events_to_csv

fn fusion_events_to_csv(events : Array[FusionEvent]) -> String

#
hampel_filter

fn hampel_filter(values : Array[Double], radius : Int, threshold : Double) -> Array[Double]

#
handle_missing_observation

fn handle_missing_observation() -> Unit

#
huber_clip_residual

fn huber_clip_residual(residual : Double, threshold : Double) -> Double

Apply a Huber-style clipping policy to a scalar residual.

#
inflate_covariance3d

fn inflate_covariance3d(covariance : Matrix, factor : Double) -> Matrix

Inflate a covariance matrix by a non-negative factor.

#
inflate_for_residual

fn inflate_for_residual(covariance : Matrix, residual : Array[Double], policy : ResidualPolicy) -> Matrix

#
interpolate_missing

fn interpolate_missing(values : Array[Double?], fallback : Double) -> Array[Double]

#
interpolate_timed_vectors

fn interpolate_timed_vectors(left : TimedVector, right : TimedVector, timestamp : Int) -> AlignedVector

Interpolate a vector between two samples.

#
interpolate_trajectory_point

fn interpolate_trajectory_point(left : TrajectoryPoint, right : TrajectoryPoint, timestamp : Int) -> TrajectoryPoint

Interpolate a position between two timestamped points.

#
inverse_transform_point3d

fn inverse_transform_point3d(pose : Pose3D, point : Vec3D) -> Vec3D

Apply the inverse pose to a parent-frame point.

#
jerk_acceleration_observation

fn jerk_acceleration_observation(dimensions : Int) -> Matrix

#
jerk_position_observation

fn jerk_position_observation(dimensions : Int) -> Matrix

#
jerk_state_accelerations

fn jerk_state_accelerations(state : Array[Double]) -> Array[Double]

#
jerk_state_jerks

fn jerk_state_jerks(state : Array[Double]) -> Array[Double]

#
jerk_state_positions

fn jerk_state_positions(state : Array[Double]) -> Array[Double]

#
jerk_state_velocities

fn jerk_state_velocities(state : Array[Double]) -> Array[Double]

#
jerk_velocity_observation

fn jerk_velocity_observation(dimensions : Int) -> Matrix

#
join_alignment_report

fn join_alignment_report(left : Array[TimedVector], right : Array[TimedVector], policy : AlignmentPolicy) -> AlignmentReport

Return an alignment report for a nearest-neighbor join.

#
join_timed_vectors

fn join_timed_vectors(left : Array[TimedVector], right : Array[TimedVector], policy : AlignmentPolicy) -> Array[(Int, Array[Double], Array[Double], Double)]

Join two streams at matching timestamps.

#
linear_slope

fn linear_slope(values : Array[Double], spacing : Double) -> Double

#
make_constant_acceleration_state

fn make_constant_acceleration_state(position : Array[Double], velocity : Array[Double], acceleration : Array[Double]) -> Array[Double]

#
make_constant_velocity_state

fn make_constant_velocity_state(position : Array[Double], velocity : Array[Double]) -> Array[Double]

Convert a position/velocity pair into a constant-velocity state vector.

#
make_innovation_diagnostics

fn make_innovation_diagnostics(innovation : Array[Double], covariance : Matrix, gate_threshold : Double) -> InnovationDiagnostics

#
make_model_schedule

fn make_model_schedule(timestamps : Array[Int], dimensions : Int, acceleration_variance : Double) -> Array[ModelStep]

#
make_replay_events

fn make_replay_events(start_timestamp : Int, count : Int, first_value : Double, velocity : Double, missing_period : Int) -> Array[ReplayEvent]

Make a reproducible sequence of scalar observations with periodic drops. This is intentionally small and deterministic so it is useful in examples, acceptance tests, and regression tests without a random dependency.

#
matrix_to_csv

fn matrix_to_csv(matrix : Matrix) -> String

#
median_smooth

fn median_smooth(values : Array[Double], radius : Int) -> Array[Double]

#
merge_timed_vector_streams

fn merge_timed_vector_streams(streams : Array[Array[TimedVector]]) -> Array[TimedVector]

Merge multiple streams.

#
merge_timed_vectors

fn merge_timed_vectors(left : Array[TimedVector], right : Array[TimedVector]) -> Array[TimedVector]

Merge two timestamped streams and retain deterministic timestamp ordering.

#
metrics_to_csv

fn metrics_to_csv(metrics : ErrorMetrics) -> String

#
metrics_to_markdown

fn metrics_to_markdown(metrics : ErrorMetrics) -> String

Produce a concise Markdown table suitable for a CI artifact or README.

#
missing_action

fn missing_action(policy : MissingObservationPolicy, consecutive : Int) -> MissingObservationAction

#
model_catalog_average_score

fn model_catalog_average_score(catalog : ModelCatalog) -> Double

#
model_catalog_best_by_latency

fn model_catalog_best_by_latency(catalog : ModelCatalog) -> ModelCatalogEntry?

#
model_catalog_compatible

fn model_catalog_compatible(catalog : ModelCatalog, dimension : Int, tags : Array[String]) -> Array[ModelCatalogEntry]

#
model_catalog_has_regression

fn model_catalog_has_regression(baseline : ModelCatalogEntry, candidate : ModelCatalogEntry, tolerance : Double, higher_is_better : Bool) -> Bool

#
model_catalog_rank

fn model_catalog_rank(catalog : ModelCatalog, policy : ModelSelectionPolicy) -> Array[ModelEvaluation]

#
model_catalog_summary

fn model_catalog_summary(catalog : ModelCatalog) -> String

#
model_catalog_total_memory

fn model_catalog_total_memory(catalog : ModelCatalog) -> Int

#
model_complexity

fn model_complexity(model : LinearModel) -> Int

#
model_entry_preferred

fn model_entry_preferred(left : ModelCatalogEntry, right : ModelCatalogEntry, higher_is_better : Bool) -> Bool

Compare two entries with a lexicographic score/latency policy.

#
model_is_well_formed

fn model_is_well_formed(model : LinearModel) -> Bool

#
model_metric_regression_score

fn model_metric_regression_score(baseline : Double, candidate : Double, higher_is_better : Bool) -> Double

#
model_stability_score

fn model_stability_score(model : LinearModel) -> Double

#
moving_average

fn moving_average(values : Array[Double], radius : Int) -> Array[Double]

#
normalize_confidences

fn normalize_confidences(confidences : Array[Double]) -> Array[Double]

Return normalized weights for a set of positive confidence scores.

#
normalize_signal

fn normalize_signal(values : Array[Double]) -> Array[Double]

#
observation_time_span

fn observation_time_span(buffer : ObservationBuffer) -> Int

#
packet_age

fn packet_age(packet : ObservationPacket, now : Int) -> Int

#
packet_is_fresh

fn packet_is_fresh(packet : ObservationPacket, now : Int, timeout : Int) -> Bool

Decide whether a packet timestamp is still usable relative to a clock.

#
permissive_alignment_policy

fn permissive_alignment_policy() -> AlignmentPolicy

Return a permissive policy for embedded sensor streams.

#
planar_range

fn planar_range(position : Array[Double], reference : Array[Double]) -> Double

Predict the Euclidean range of a Cartesian position and the corresponding bearing-free residual used by a range-only sensor.

#
planar_range_jacobian

fn planar_range_jacobian(position : Array[Double], reference : Array[Double]) -> Array[Double]

#
point_cloud_bounds3d

fn point_cloud_bounds3d(points : Array[Vec3D]) -> (Vec3D, Vec3D)?

Compute the axis-aligned bounds of a point cloud.

#
point_cloud_centroid3d

fn point_cloud_centroid3d(points : Array[Vec3D]) -> Vec3D?

Compute the centroid of a finite point cloud.

#
point_cloud_covariance3d

fn point_cloud_covariance3d(points : Array[Vec3D]) -> Matrix

Compute the covariance matrix of a 3D point cloud.

#
polynomial_observations

fn polynomial_observations(x : Array[Double], y : Array[Double], basis : PolynomialBasis) -> Array[BatchObservation]

Construct polynomial observations from x/y samples.

#
pose3d_from_matrix

fn pose3d_from_matrix(matrix : Matrix) -> Pose3D

Construct a pose from a homogeneous 4x4 transform matrix.

#
pose3d_from_vector

fn pose3d_from_vector(values : Array[Double]) -> Pose3D?

Construct a pose from a seven-element vector.

#
pose3d_identity

fn pose3d_identity() -> Pose3D

Return the identity pose.

#
pose3d_series_interpolate

fn pose3d_series_interpolate(series : Pose3DSeries, timestamp : Int) -> Pose3D?

Interpolate a pose series at a timestamp. Extrapolation is not performed.

#
pose3d_series_max_step

fn pose3d_series_max_step(series : Pose3DSeries) -> Double

Compute the maximum translation step between adjacent poses.

#
pose3d_series_mean_translation

fn pose3d_series_mean_translation(series : Pose3DSeries) -> Vec3D

Compute the average translation of a pose series.

#
pose3d_series_quality

fn pose3d_series_quality(series : Pose3DSeries) -> Double

Return a stable scalar quality score for a pose series.

#
position_observation

fn position_observation(dimensions : Int) -> Matrix

Observe only the position components of a constant-velocity state.

#
predict_constant_acceleration

fn predict_constant_acceleration(state : Array[Double], dt : Double) -> Array[Double]

#
predict_constant_velocity

fn predict_constant_velocity(state : Array[Double], dt : Double) -> Array[Double]

#
predict_time_series_trend

fn predict_time_series_trend(fit : BatchFitResult, origin : Int, timestamps : Array[Int]) -> Array[Double]

Predict values on a timestamp grid from a time-series trend fit.

#
project_point_to_plane3d

fn project_point_to_plane3d(point : Vec3D, plane_point : Vec3D, plane_normal : Vec3D) -> Vec3D

Project a point onto a plane defined by a point and a normal.

#
propagate_diagonal_uncertainty

fn propagate_diagonal_uncertainty(covariance : Matrix, gain : Array[Double], process_variance : Double) -> Matrix

Propagate a diagonal covariance through a linear gain.

#
proportional_control

fn proportional_control(state : Array[Double], target : Array[Double], gain : Double, limits : ControlLimits) -> Array[Double]

Generate a control vector that moves a state toward a target under limits.

#
quality_adjusted_covariance

fn quality_adjusted_covariance(covariance : Matrix, report : DataQualityReport, floor : Double) -> Matrix

#
quality_weight

fn quality_weight(report : DataQualityReport) -> Double

#
quaternion3d_between

fn quaternion3d_between(from : Vec3D, to : Vec3D) -> Quaternion3D

Build a quaternion that rotates one vector to another using a stable half-way construction. Opposing vectors fall back to a deterministic axis.

#
quaternion3d_from_matrix

fn quaternion3d_from_matrix(matrix : Matrix) -> Quaternion3D

Construct a quaternion from a 3x3 rotation matrix using the trace branch. This is intended for matrices close to a proper rotation.

#
quaternion3d_identity

fn quaternion3d_identity() -> Quaternion3D

Return the identity orientation.

#
recursive_least_squares_fit

fn recursive_least_squares_fit(observations : Array[BatchObservation], initial_covariance : Double, forgetting : Double) -> RecursiveLeastSquares

Fit RLS over a batch and return its final state.

#
regular_timestamps

fn regular_timestamps(start : Int, end : Int, period : Int) -> Array[Int]

Build a regular timestamp grid.

#
regularize_uncertainty_covariance

fn regularize_uncertainty_covariance(covariance : Matrix, floor : Double) -> Matrix

Return a covariance matrix regularized to a positive diagonal floor.

#
relative_pose3d

fn relative_pose3d(parent : Pose3D, child : Pose3D) -> Pose3D

Compute the relative pose from parent to child.

#
replay_result_is_data_loss

fn replay_result_is_data_loss(result : UpdateResult) -> Bool

#
replay_result_is_success

fn replay_result_is_success(result : UpdateResult) -> Bool

#
report_line

fn report_line(label : String, value : Double, unit : String) -> String

#
report_lines

fn report_lines(lines : Array[(String, Double, String)]) -> String

#
resample_linear

fn resample_linear(values : Array[Double], output_length : Int) -> Array[Double]

#
resample_timed_vectors

fn resample_timed_vectors(samples : Array[TimedVector], start : Int, end : Int, period : Int, policy : AlignmentPolicy) -> (Array[AlignedVector], AlignmentReport)

Resample a stream on a regular grid and return both values and report.

#
resample_trajectory

fn resample_trajectory(points : Array[TrajectoryPoint], timestamps : Array[Int]) -> Array[TrajectoryPoint]

#
retime_constant_velocity

fn retime_constant_velocity(model : Matrix, dimensions : Int, dt : Double) -> Matrix

Update a transition matrix in-place for a new sampling interval while retaining its shape.

#
robust_confidence_radius

fn robust_confidence_radius(residuals : Array[Double], confidence_scale : Double) -> Double

Compute a robust confidence radius from residuals and a confidence scale.

#
robust_covariance_factor

fn robust_covariance_factor(innovation : Array[Double], tuning : Double) -> Double

#
robust_fusion

fn robust_fusion(measurements : Array[FusionMeasurement], tuning : Double) -> FusionResult

#
robust_huber_config

fn robust_huber_config() -> RobustEstimatorConfig

A configuration tuned for Huber-style sensor rejection.

#
robust_inlier_fraction

fn robust_inlier_fraction(weights : Array[Double], threshold : Double) -> Double

Return the fraction of samples whose robust weight is above a threshold.

#
robust_line_fit

fn robust_line_fit(x : Array[Double], y : Array[Double], config : RobustEstimatorConfig) -> RobustLineFit

Fit a robust straight line with iteratively reweighted normal equations.

#
robust_location

fn robust_location(values : Array[Double], config : RobustEstimatorConfig) -> RobustEstimate

Estimate a robust location with iteratively reweighted means.

#
robust_loss_value

fn robust_loss_value(kind : RobustLossKind, residual : Double, tuning : Double) -> Double

Return the loss value for a standardized residual.

#
robust_loss_weight

fn robust_loss_weight(kind : RobustLossKind, residual : Double, tuning : Double, minimum_weight : Double) -> Double

Return the iteratively reweighted least-squares weight.

#
robust_mad

fn robust_mad(values : Array[Double], location : Double) -> Double

Compute the median absolute deviation around a location.

#
robust_median

fn robust_median(values : Array[Double]) -> Double

Compute the median of finite values.

#
robust_quality_score

fn robust_quality_score(residuals : Array[Double], scale_limit : Double) -> Double

Compute a robust score in [0, 1] from residuals and a scale limit.

#
robust_residual_variance

fn robust_residual_variance(residuals : Array[Double], weights : Array[Double]) -> Double

Compute a weighted covariance of scalar residuals.

#
robust_reweight_rows

fn robust_reweight_rows(rows : Array[Array[Double]], residuals : Array[Double], config : RobustEstimatorConfig, scale : Double) -> Array[Array[Double]]

Down-weight an observation vector using one scalar residual per row.

#
robust_scale_from_mad

fn robust_scale_from_mad(mad : Double) -> Double

Convert MAD to a Gaussian-consistent standard deviation estimate.

#
robust_tukey_config

fn robust_tukey_config() -> RobustEstimatorConfig

A configuration tuned for strongly contaminated streams.

#
robust_weight

fn robust_weight(residual : Double, tuning : Double) -> Double

Bounded residual reweighting for robust updates. The output can be used to inflate measurement covariance before calling KalmanND::update.

#
robust_weighted_location

fn robust_weighted_location(values : Array[Double], base_weights : Array[Double], config : RobustEstimatorConfig) -> RobustEstimate

Estimate robust location using explicit base weights.

#
robust_weighted_mean

fn robust_weighted_mean(samples : Array[RobustSample]) -> Double

Compute a weighted mean while ignoring invalid samples.

#
robust_weighted_quantile

fn robust_weighted_quantile(values : Array[Double], weights : Array[Double], probability : Double) -> Double

Compute a robust weighted quantile using sorted finite values.

#
robust_weighted_scale

fn robust_weighted_scale(residuals : Array[Double], weights : Array[Double]) -> Double

Estimate a robust scale from a weighted residual vector.

#
robust_weighted_variance

fn robust_weighted_variance(samples : Array[RobustSample], location : Double) -> Double

Compute a weighted variance around a known location.

#
robust_weights_for_residuals

fn robust_weights_for_residuals(residuals : Array[Double], config : RobustEstimatorConfig, scale : Double) -> Array[Double]

Return robust weights for a residual vector.

#
rolling_mean

fn rolling_mean(values : Array[Double], window : Int) -> Array[Double]

#
rolling_variance

fn rolling_variance(values : Array[Double], window : Int) -> Array[Double]

#
rts_smooth

fn rts_smooth(filtered_states : Array[Array[Double]], filtered_covariances : Array[Matrix], predicted_states : Array[Array[Double]], predicted_covariances : Array[Matrix], transitions : Array[Matrix]) -> SmoothingResult

Rauch-Tung-Striebel smoother for a linear model.

#
run_constant_velocity_2d_simulation

fn run_constant_velocity_2d_simulation(steps : Int, dt : Double, measurement_noise : Double, missing_period : Int, outlier_period : Int, seed : Int) -> SimulationResult

Run the ready-to-use tracker against a simulated two-dimensional stream.

#
run_scalar_simulation

fn run_scalar_simulation(steps : Int, measurement_noise : Double, missing_period : Int, outlier_period : Int, seed : Int) -> SimulationResult

#
safety_check_all

fn safety_check_all(constraints : Array[SafetyConstraint], value : Double, timestamp : Int?) -> Array[SafetyCheckResult]

#
safety_constraint_is_tight

fn safety_constraint_is_tight(result : SafetyCheckResult, relative_margin : Double) -> Bool

#
safety_constraint_summary

fn safety_constraint_summary(result : SafetyCheckResult) -> String

#
safety_covariance_radius

fn safety_covariance_radius(covariance : Matrix, multiplier : Double) -> Double

#
safety_distance_bound

fn safety_distance_bound(name : String, threshold : Double, tolerance : Double, severity : Double) -> SafetyConstraint

Construct an explicit distance-to-reference constraint.

#
safety_distance_constraint

fn safety_distance_constraint(constraint : SafetyConstraint, point : Vec3D, reference : Vec3D, timestamp : Int?) -> SafetyCheckResult

#
safety_distance_to_envelope

fn safety_distance_to_envelope(envelope : SafetyEnvelope, point : Vec3D) -> Double

#
safety_envelope_health

fn safety_envelope_health(envelope : SafetyEnvelope) -> Double

#
safety_inflate_position_bounds

fn safety_inflate_position_bounds(minimum : Vec3D, maximum : Vec3D, covariance : Matrix, multiplier : Double) -> (Vec3D, Vec3D)

#
safety_mahalanobis_constraint

fn safety_mahalanobis_constraint(constraint : SafetyConstraint, error : Array[Double], covariance : Matrix, timestamp : Int?) -> SafetyCheckResult

#
safety_project_position

fn safety_project_position(envelope : SafetyEnvelope, point : Vec3D) -> Vec3D

A conservative projection of a point onto an axis-aligned envelope.

#
safety_results_score

fn safety_results_score(results : Array[SafetyCheckResult]) -> Double

#
safety_timestamp_consistent

fn safety_timestamp_consistent(previous : Int?, current : Int) -> Bool

#
safety_violation_count

fn safety_violation_count(results : Array[SafetyCheckResult]) -> Int

#
safety_worst_result

fn safety_worst_result(results : Array[SafetyCheckResult]) -> SafetyCheckResult?

#
score_model

fn score_model(name : String, residuals : Array[Array[Double]], parameter_count : Int, consistency : Double) -> ModelScore

Calculate common model-selection scores from residuals.

#
sensor_samples_to_csv

fn sensor_samples_to_csv(samples : Array[SensorSample]) -> String

#
shift_timed_vector_stream

fn shift_timed_vector_stream(samples : Array[TimedVector], lag : Int) -> Array[TimedVector]

Shift a stream by a measured lag.

#
signal_autocorrelation

fn signal_autocorrelation(values : Array[Double], lag : Int) -> Double

#
signal_correlation

fn signal_correlation(left : Array[Double], right : Array[Double]) -> Double

#
signal_difference

fn signal_difference(values : Array[Double], spacing : Double) -> Array[Double]

#
signal_integral

fn signal_integral(values : Array[Double], spacing : Double) -> Array[Double]

#
signed_plane_distance3d

fn signed_plane_distance3d(point : Vec3D, plane_point : Vec3D, plane_normal : Vec3D) -> Double

Return the signed distance from a point to a plane.

#
simulate_constant_velocity_2d

fn simulate_constant_velocity_2d(steps : Int, dt : Double, initial_position : Array[Double], velocity : Array[Double], measurement_noise : Double, missing_period : Int, outlier_period : Int, seed : Int) -> Array[SensorSample]

Generate a two-dimensional constant-velocity trajectory with repeatable sensor noise, dropped packets, and occasional gross outliers.

#
simulate_scalar_measurements

fn simulate_scalar_measurements(steps : Int, initial_value : Double, drift : Double, noise : Double, missing_period : Int, outlier_period : Int, seed : Int) -> Array[SensorSample]

#
smooth_with_missing

fn smooth_with_missing(values : Array[Double?], fallback : Double, alpha : Double) -> Array[Double]

#
sort_timed_vectors

fn sort_timed_vectors(samples : Array[TimedVector]) -> Array[TimedVector]

Return a copy of a series sorted by timestamp using insertion sort.

#
state_confidence_bands

fn state_confidence_bands(state : Array[Double], covariance : Matrix, multiplier : Double) -> Array[ConfidenceBand]

Build component confidence bands from a state and covariance.

#
state_guard_changed_indices

fn state_guard_changed_indices(report : StateGuardReport) -> Array[Int]

#
state_guard_distance

fn state_guard_distance(original : Array[Double], repaired : Array[Double]) -> Double

#
state_guard_from_covariance

fn state_guard_from_covariance(state : Array[Double], covariance : Matrix, multiplier : Double, minimum : Array[Double], maximum : Array[Double]) -> StateGuard

#
state_guard_is_finite

fn state_guard_is_finite(state : Array[Double]) -> Bool

#
state_guard_issue_summary

fn state_guard_issue_summary(issue : StateGuardIssue) -> String

#
state_guard_merge_rules

fn state_guard_merge_rules(left : Array[StateGuardRule], right : Array[StateGuardRule]) -> Array[StateGuardRule]

#
state_guard_normalize_weights

fn state_guard_normalize_weights(weights : Array[Double]) -> Array[Double]

#
state_guard_report_summary

fn state_guard_report_summary(report : StateGuardReport) -> String

#
state_guard_rules_for_dimension

fn state_guard_rules_for_dimension(minimum : Array[Double], maximum : Array[Double], tolerance : Double) -> Array[StateGuardRule]

#
state_guard_validate_dimension

fn state_guard_validate_dimension(state : Array[Double], expected_dimension : Int) -> Bool

#
state_guard_weighted_distance

fn state_guard_weighted_distance(left : Array[Double], right : Array[Double], weights : Array[Double]) -> Double

#
state_guard_worst_issue

fn state_guard_worst_issue(report : StateGuardReport) -> StateGuardIssue?

#
state_has_valid_uncertainty

fn state_has_valid_uncertainty(state : Array[Double], covariance : Matrix) -> Bool

#
state_positions

fn state_positions(state : Array[Double]) -> Array[Double]

#
state_velocities

fn state_velocities(state : Array[Double]) -> Array[Double]

#
state_within_bounds

fn state_within_bounds(state : Array[Double], lower : Array[Double], upper : Array[Double]) -> Bool

Check a state against component-wise bounds without mutating it.

#
stream_health_score

fn stream_health_score(runtime : StreamRuntime, expected_count : Int) -> Double

#
stream_jitter

fn stream_jitter(records : Array[StreamRecord]) -> Double

#
stream_outlier_fraction

fn stream_outlier_fraction(records : Array[StreamRecord], center : Double, scale : Double) -> Double

#
stream_records_between

fn stream_records_between(records : Array[StreamRecord], start : Int, end : Int) -> Array[StreamRecord]

#
stream_records_for_source

fn stream_records_for_source(records : Array[StreamRecord], source : String) -> Array[StreamRecord]

#
stream_records_values

fn stream_records_values(records : Array[StreamRecord]) -> Array[Double]

#
stream_statistics

fn stream_statistics(records : Array[StreamRecord]) -> StreamStatistics

#
stream_statistics_merge

fn stream_statistics_merge(left : StreamStatistics, right : StreamStatistics) -> StreamStatistics

#
stream_window_statistics

fn stream_window_statistics(window : StreamWindow) -> StreamStatistics

#
strict_alignment_policy

fn strict_alignment_policy() -> AlignmentPolicy

Return a strict policy for synchronized control loops.

#
summarize_pipeline

fn summarize_pipeline(events : Array[PipelineEvent], sensor : String) -> PipelineReport

#
summarize_robust_residuals

fn summarize_robust_residuals(values : Array[Double]) -> RobustResidualSummary

Summarize a residual array while retaining explicit invalid counts.

#
summarize_telemetry

fn summarize_telemetry(samples : Array[TelemetrySample]) -> TelemetrySummary

#
summarize_uncertainty_covariance

fn summarize_uncertainty_covariance(covariance : Matrix, tolerance : Double) -> CovarianceSummary

Summarize a covariance matrix with an absolute symmetry tolerance.

#
telemetry_acceptance_rate

fn telemetry_acceptance_rate(summary : TelemetrySummary) -> Double

#
telemetry_all_finite

fn telemetry_all_finite(samples : Array[TelemetrySample]) -> Bool

#
telemetry_failure_rate

fn telemetry_failure_rate(summary : TelemetrySummary) -> Double

#
telemetry_from_filter

fn telemetry_from_filter(timestamp : Int, channel : String, filter : Kalman1D, result : UpdateResult) -> TelemetrySample

#
telemetry_gap_count

fn telemetry_gap_count(samples : Array[TelemetrySample], expected_period : Int) -> Int

#
telemetry_is_monotonic

fn telemetry_is_monotonic(samples : Array[TelemetrySample]) -> Bool

#
telemetry_is_usable

fn telemetry_is_usable(summary : TelemetrySummary, minimum_quality : Double) -> Bool

#
telemetry_merge

fn telemetry_merge(left : Array[TelemetrySample], right : Array[TelemetrySample]) -> Array[TelemetrySample]

#
telemetry_outlier_count

fn telemetry_outlier_count(samples : Array[TelemetrySample], threshold : Double) -> Int

#
telemetry_quality_adjusted_value

fn telemetry_quality_adjusted_value(sample : TelemetrySample, fallback : Double) -> Double

#
telemetry_quality_histogram

fn telemetry_quality_histogram(samples : Array[TelemetrySample], buckets : Int) -> Histogram

#
telemetry_quality_weighted_mean

fn telemetry_quality_weighted_mean(samples : Array[TelemetrySample]) -> Double

#
telemetry_range

fn telemetry_range(samples : Array[TelemetrySample]) -> Double

#
telemetry_resample

fn telemetry_resample(samples : Array[TelemetrySample], timestamps : Array[Int]) -> Array[TelemetrySample]

#
telemetry_sample_count

fn telemetry_sample_count(samples : Array[TelemetrySample], result : UpdateResult) -> Int

#
telemetry_status

fn telemetry_status(samples : Array[TelemetrySample]) -> FilterStatus

#
telemetry_status_score

fn telemetry_status_score(status : FilterStatus) -> Double

#
telemetry_to_csv

fn telemetry_to_csv(samples : Array[TelemetrySample]) -> String

#
telemetry_values

fn telemetry_values(samples : Array[TelemetrySample]) -> Array[Double]

#
time_series_observations

fn time_series_observations(timestamps : Array[Int], values : Array[Double]) -> Array[BatchObservation]

Build observations for a scalar time series with an intercept and time.

#
timed_vector_covariance

fn timed_vector_covariance(samples : Array[TimedVector]) -> Matrix

Compute a covariance matrix for a timestamped vector stream.

#
timed_vector_gaps

fn timed_vector_gaps(samples : Array[TimedVector], expected_period : Int) -> Array[Int]

Return timestamp gaps larger than an expected period.

#
timed_vector_grid

fn timed_vector_grid(samples : Array[TimedVector], period : Int) -> Array[Int]

Return a regular grid that covers all valid samples.

#
timed_vector_interpolate

fn timed_vector_interpolate(samples : Array[TimedVector], timestamp : Int, policy : AlignmentPolicy) -> AlignedVector

Interpolate a series without extrapolating outside its support.

#
timed_vector_mean

fn timed_vector_mean(samples : Array[TimedVector]) -> Array[Double]

Compute the average vector over finite samples.

#
timed_vector_median_period

fn timed_vector_median_period(samples : Array[TimedVector]) -> Int

Return the median timestamp interval.

#
timed_vector_nearest

fn timed_vector_nearest(samples : Array[TimedVector], timestamp : Int, policy : AlignmentPolicy) -> AlignedVector

Find the nearest sample to a timestamp.

#
timed_vector_quality_drop

fn timed_vector_quality_drop(samples : Array[TimedVector]) -> Double

Return the maximum absolute quality drop in a stream.

#
timed_vector_quality_fraction

fn timed_vector_quality_fraction(samples : Array[TimedVector], threshold : Double) -> Double

Compute the fraction of a stream that meets a quality threshold.

#
timed_vectors_are_monotonic

fn timed_vectors_are_monotonic(samples : Array[TimedVector]) -> Bool

Return whether timestamps are monotonic.

#
trajectory_accelerations

fn trajectory_accelerations(points : Array[TrajectoryPoint]) -> Array[Array[Double]]

Approximate acceleration from adjacent velocity samples.

#
trajectory_average_speed

fn trajectory_average_speed(points : Array[TrajectoryPoint]) -> Double

#
trajectory_average_velocity

fn trajectory_average_velocity(points : Array[TrajectoryPoint]) -> Array[Double]

#
trajectory_consistency_score

fn trajectory_consistency_score(points : Array[TrajectoryPoint], process_noise : Double) -> Double

#
trajectory_detect_segments

fn trajectory_detect_segments(points : Array[TrajectoryPoint], max_gap : Int) -> Array[(Int, Int)]

#
trajectory_event_counts

fn trajectory_event_counts(events : Array[TrajectoryEvent]) -> Array[(TrajectoryQualityFlag, Int)]

#
trajectory_interval

fn trajectory_interval(previous : TrajectoryPoint, current : TrajectoryPoint, prior_speed : Double) -> TrajectoryInterval

#
trajectory_length

fn trajectory_length(points : Array[Array[Double]]) -> Double

Arc length of a sequence of positions.

#
trajectory_max_speed

fn trajectory_max_speed(points : Array[TrajectoryPoint]) -> Double

#
trajectory_max_velocity

fn trajectory_max_velocity(points : Array[TrajectoryPoint]) -> Double

#
trajectory_position_bounds

fn trajectory_position_bounds(points : Array[TrajectoryPoint]) -> (Array[Double], Array[Double])?

#
trajectory_report_summary

fn trajectory_report_summary(report : TrajectoryQualityReport) -> String

#
trajectory_segment

fn trajectory_segment(points : Array[TrajectoryPoint], start_index : Int, end_index : Int, max_speed_limit : Double, max_acceleration_limit : Double, max_jerk_limit : Double) -> TrajectorySegment

Build an annotated segment and retain only valid monotonic intervals.

#
trajectory_total_distance

fn trajectory_total_distance(points : Array[TrajectoryPoint]) -> Double

#
trajectory_turning_angles

fn trajectory_turning_angles(points : Array[TrajectoryPoint]) -> Array[Double]

#
transform_point3d

fn transform_point3d(pose : Pose3D, point : Vec3D) -> Vec3D

Compute a rigid-body transform from a local vector and pose.

#
transform_points3d

fn transform_points3d(pose : Pose3D, points : Array[Vec3D]) -> Array[Vec3D]

Transform an array of points without modifying the input.

#
transformed_cloud_error3d

fn transformed_cloud_error3d(pose : Pose3D, points : Array[Vec3D], expected : Array[Vec3D]) -> Double

Compute the sum of squared point residuals after applying a pose.

#
uncertainty_mahalanobis_radius

fn uncertainty_mahalanobis_radius(residual : Array[Double], covariance : Matrix) -> Double

Compute the Mahalanobis radius using a covariance matrix.

#
uncertainty_overconfidence

fn uncertainty_overconfidence(coverage : Double, target : Double, tolerance : Double) -> Bool

Estimate whether an uncertainty report is overconfident.

#
uncertainty_underconfidence

fn uncertainty_underconfidence(coverage : Double, target : Double, tolerance : Double) -> Bool

Estimate whether an uncertainty report is too conservative.

#
uncertainty_volume_proxy

fn uncertainty_volume_proxy(covariance : Matrix) -> Double

Compute the state uncertainty volume proxy from a covariance determinant.

#
update_result_to_string

fn update_result_to_string(result : UpdateResult) -> String

#
valid_batch_observation_count

fn valid_batch_observation_count(observations : Array[BatchObservation]) -> Int

Return the number of valid observations.

#
validate_matrix

fn validate_matrix(name : String, matrix : Matrix, expected_rows : Int, expected_cols : Int) -> ValidationReport

#
validate_packet

fn validate_packet(name : String, packet : ObservationPacket, dimension : Int) -> ValidationReport

#
validate_sensor_configuration

fn validate_sensor_configuration(configuration : SensorConfiguration) -> ValidationReport

#
validate_state

fn validate_state(name : String, state : Array[Double], covariance : Matrix) -> ValidationReport

#
validate_trajectory

fn validate_trajectory(name : String, points : Array[TrajectoryPoint]) -> ValidationReport

#
validation_has_error

fn validation_has_error(report : ValidationReport) -> Bool

#
validation_has_warning

fn validation_has_warning(report : ValidationReport) -> Bool

#
validation_summary

fn validation_summary(report : ValidationReport) -> String

#
vec3d_from_array

fn vec3d_from_array(values : Array[Double]) -> Vec3D?

Construct from the first three entries of an array.

#
vec3d_max

fn vec3d_max(left : Vec3D, right : Vec3D) -> Vec3D

Return the component-wise maximum.

#
vec3d_min

fn vec3d_min(left : Vec3D, right : Vec3D) -> Vec3D

Return the component-wise minimum.

#
vec3d_splat

fn vec3d_splat(value : Double) -> Vec3D

Return a vector with all components equal to value.

#
vec3d_zero

fn vec3d_zero() -> Vec3D

Return a zero vector.

#
vector_add

fn vector_add(left : Array[Double], right : Array[Double]) -> Array[Double]

#
vector_all_close

fn vector_all_close(left : Array[Double], right : Array[Double], tolerance : Double) -> Bool

#
vector_axpy

fn vector_axpy(alpha : Double, x : Array[Double], y : Array[Double]) -> Array[Double]

#
vector_clamp

fn vector_clamp(values : Array[Double], lower : Double, upper : Double) -> Array[Double]

#
vector_covariance

fn vector_covariance(samples : Array[Array[Double]]) -> Matrix

#
vector_distance

fn vector_distance(left : Array[Double], right : Array[Double]) -> Double

#
vector_dot

fn vector_dot(left : Array[Double], right : Array[Double]) -> Double

Dot product with a safe length check.

#
vector_hadamard

fn vector_hadamard(left : Array[Double], right : Array[Double]) -> Array[Double]

#
vector_is_finite

fn vector_is_finite(values : Array[Double]) -> Bool

#
vector_l1_norm

fn vector_l1_norm(values : Array[Double]) -> Double

#
vector_l2_norm

fn vector_l2_norm(values : Array[Double]) -> Double

#
vector_lerp

fn vector_lerp(left : Array[Double], right : Array[Double], amount : Double) -> Array[Double]

#
vector_linf_norm

fn vector_linf_norm(values : Array[Double]) -> Double

#
vector_mad

fn vector_mad(values : Array[Double]) -> Double

#
vector_mae

fn vector_mae(actual : Array[Double], expected : Array[Double]) -> Double

#
vector_mean

fn vector_mean(values : Array[Double]) -> Double

#
vector_mean_center

fn vector_mean_center(values : Array[Double]) -> Array[Double]

#
vector_median

fn vector_median(values : Array[Double]) -> Double

#
vector_normalize

fn vector_normalize(values : Array[Double]) -> Array[Double]

Normalize a vector. Zero vectors stay zero instead of producing NaNs.

#
vector_project

fn vector_project(value : Array[Double], basis : Array[Double]) -> Array[Double]

#
vector_quantile

fn vector_quantile(values : Array[Double], probability : Double) -> Double

Linear-interpolated quantile in the closed interval [0, 1].

#
vector_reject

fn vector_reject(value : Array[Double], basis : Array[Double]) -> Array[Double]

#
vector_replace_non_finite

fn vector_replace_non_finite(values : Array[Double], fallback : Double) -> Array[Double]

#
vector_rmse

fn vector_rmse(actual : Array[Double], expected : Array[Double]) -> Double

#
vector_scale

fn vector_scale(values : Array[Double], factor : Double) -> Array[Double]

#
vector_sub

fn vector_sub(left : Array[Double], right : Array[Double]) -> Array[Double]

#
vector_sum

fn vector_sum(values : Array[Double]) -> Double

#
vector_to_csv

fn vector_to_csv(values : Array[Double]) -> String

Convert a vector to one CSV row.

#
vector_variance

fn vector_variance(values : Array[Double]) -> Double

#
vector_weighted_mean

fn vector_weighted_mean(values : Array[Double], weights : Array[Double]) -> Double

#
vector_weighted_variance

fn vector_weighted_variance(values : Array[Double], weights : Array[Double]) -> Double

#
vector_wrap

fn vector_wrap(value : Double, period : Double) -> Double

#
velocity_observation

fn velocity_observation(dimensions : Int) -> Matrix

Observe only the velocity components of a constant-velocity state.