Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
dipla::aigenlib Namespace Reference

Data Structures

struct  Point
 Three-dimensional value type for route arithmetic. More...
class  Matrix
 Owning, contiguous, row-major double matrix. More...
struct  Sensor
 Sparse uniform-averaging measurement operator. More...

Typedefs

using Vector = std::vector<double>

Enumerations

enum class  SolveMethod { cholesky , pseudoinverse }

Functions

Point operator+ (Point left, const Point &right) noexcept
 Add points.
Point operator- (Point left, const Point &right) noexcept
 Subtract points.
Point operator* (Point point, double scale) noexcept
 Scale coordinates.
Point operator* (double scale, Point point) noexcept
 Scale coordinates.
Point operator/ (Point point, double divisor)
 Divide coordinates.
bool operator== (const Point &left, const Point &right) noexcept
 Exact equality.
bool operator!= (const Point &left, const Point &right) noexcept
 Exact inequality.
Matrix solve_symmetric (const Matrix &system, const Matrix &right, SolveMethod *method=nullptr)
 Solve a finite symmetric system with multiple right-hand sides.
Matrix matern32 (const std::vector< Point > &positions, double sigma2, double lengthscale)
 Construct a symmetric Matern-3/2 covariance over supplied positions.
Matrix project (const Sensor &sensor, const Matrix &covariance)
 Project covariance through sparse averaging rows: B = H P.
Matrix innovation (const Sensor &sensor, const Matrix &projected)
 Construct innovation covariance S = H P H^T + R from B = H P.
Vector observe (const Sensor &sensor, const Vector &field)
 Average field values through a sensor.
double expected_reduction (const Matrix &covariance, const std::vector< bool > &mask, const Sensor &sensor)
 Sum the masked posterior diagonal reduction without modifying belief.
void condition (Matrix &covariance, Vector *mean, const Sensor &sensor, const Vector *measurement)
 Condition a GP in place with optional measurement assimilation.

Variables

constexpr std::size_t max_extent = 2601
constexpr double pseudoinverse_relative_cutoff = 1e-15

Typedef Documentation

◆ Vector

using dipla::aigenlib::Vector = std::vector<double>

Owning scalar vector; size validation belongs to the consuming operation.

Definition at line 37 of file aigenlib.hpp.

Enumeration Type Documentation

◆ SolveMethod

enum class dipla::aigenlib::SolveMethod
strong

Factorization selected for a solve.

Enumerator
cholesky 

Positive-definite triangular factorization.

pseudoinverse 

Signed spectral inverse with null-mode truncation.

Definition at line 135 of file aigenlib.hpp.

Function Documentation

◆ condition()

void dipla::aigenlib::condition ( Matrix & covariance,
Vector * mean,
const Sensor & sensor,
const Vector * measurement )

Condition a GP in place with optional measurement assimilation.

Both mean and measurement must be supplied, or both null for look-ahead. All shapes, indices, noise and input finiteness are checked before mutation. Workspace is two m-by-n matrices, small solver storage and one 4 KiB scratch tile per active lane, never an n-by-n product temporary. Large multi-row updates use at most three lanes and join before symmetry restoration; a thread-creation failure falls back to remaining serial work. A single-row observation fuses updating and symmetry restoration without scratch; both triangle calculations and their averaging order are preserved exactly. Arithmetic overflow throws; after mutation begins it does not roll back the belief. Concurrent access requires caller synchronization.

Parameters
covarianceSquare finite covariance, updated in place.
meanOptional finite cell mean, updated in place.
sensorAveraging operator.
measurementOptional finite measurement values.

Definition at line 409 of file aigenlib.cpp.

◆ expected_reduction()

double dipla::aigenlib::expected_reduction ( const Matrix & covariance,
const std::vector< bool > & mask,
const Sensor & sensor )

Sum the masked posterior diagonal reduction without modifying belief.

Solves S X = B and clamps each selected B-column dot X-column to [0, max(0, Pii)], matching the production utility calculation. Checks the accessed projection and selected diagonal, not unused covariance entries.

Parameters
covarianceSquare finite cell covariance.
maskOne selection bit per cell.
sensorAveraging operator.
Returns
Expected trace reduction.

Definition at line 388 of file aigenlib.cpp.

◆ innovation()

Matrix dipla::aigenlib::innovation ( const Sensor & sensor,
const Matrix & projected )

Construct innovation covariance S = H P H^T + R from B = H P.

Validates rows and variances against the projected cell count.

Parameters
sensorAveraging operator.
projectedMeasurement-by-cell cross covariance.
Returns
Measurement-by-measurement innovation covariance.

Definition at line 359 of file aigenlib.cpp.

◆ matern32()

Matrix dipla::aigenlib::matern32 ( const std::vector< Point > & positions,
double sigma2,
double lengthscale )

Construct a symmetric Matern-3/2 covariance over supplied positions.

Kernel parameters are supplied by the caller, not selected by this library. Coordinate and length-scale units must agree. One triangle is evaluated and mirrored. Rejects nonfinite positions/parameters.

Parameters
positionsGrid-cell coordinates, at most max_extent.
sigma2Positive marginal variance.
lengthscalePositive correlation length in the coordinates' units.
Returns
Dense symmetric prior.

Definition at line 324 of file aigenlib.cpp.

◆ observe()

Vector dipla::aigenlib::observe ( const Sensor & sensor,
const Vector & field )

Average field values through a sensor.

Parameters
sensorOperator.
fieldFinite cell values.
Returns
Measurements.

Definition at line 376 of file aigenlib.cpp.

◆ operator!=()

bool dipla::aigenlib::operator!= ( const Point & left,
const Point & right )
noexcept

Exact inequality.

Parameters
leftFirst.
rightSecond.
Returns
Any coordinate differs.

Definition at line 219 of file aigenlib.cpp.

◆ operator*() [1/2]

Point dipla::aigenlib::operator* ( double scale,
Point point )
noexcept

Scale coordinates.

Parameters
scaleFactor.
pointInput.
Returns
Scaled point.

Definition at line 212 of file aigenlib.cpp.

◆ operator*() [2/2]

Point dipla::aigenlib::operator* ( Point point,
double scale )
noexcept

Scale coordinates.

Parameters
pointInput.
scaleFactor.
Returns
Scaled point.

Definition at line 208 of file aigenlib.cpp.

◆ operator+()

Point dipla::aigenlib::operator+ ( Point left,
const Point & right )
noexcept

Add points.

Parameters
leftFirst.
rightSecond.
Returns
Sum.

Definition at line 206 of file aigenlib.cpp.

◆ operator-()

Point dipla::aigenlib::operator- ( Point left,
const Point & right )
noexcept

Subtract points.

Parameters
leftFirst.
rightSecond.
Returns
Difference.

Definition at line 207 of file aigenlib.cpp.

◆ operator/()

Point dipla::aigenlib::operator/ ( Point point,
double divisor )

Divide coordinates.

Parameters
pointInput.
divisorFinite nonzero divisor.
Returns
Quotient.

Definition at line 213 of file aigenlib.cpp.

◆ operator==()

bool dipla::aigenlib::operator== ( const Point & left,
const Point & right )
noexcept

Exact equality.

Parameters
leftFirst.
rightSecond.
Returns
All coordinates equal.

Definition at line 218 of file aigenlib.cpp.

◆ project()

Matrix dipla::aigenlib::project ( const Sensor & sensor,
const Matrix & covariance )

Project covariance through sparse averaging rows: B = H P.

Requires a square finite covariance. Checks shape/sensor before allocation and detects nonfinite projected values in the sensor's accessed rows, without rescanning the whole grid per candidate. Unused rows are not inspected; conditioning checks the complete covariance before mutation.

Parameters
sensorAveraging operator.
covarianceSquare cell covariance.
Returns
Measurement-by-cell cross covariance.

Definition at line 342 of file aigenlib.cpp.

◆ solve_symmetric()

Matrix dipla::aigenlib::solve_symmetric ( const Matrix & system,
const Matrix & right,
SolveMethod * method = nullptr )

Solve a finite symmetric system with multiple right-hand sides.

Cholesky is attempted first. On failure, bounded cyclic Jacobi sweeps compute a spectral pseudoinverse with abs(lambda) > 1e-15 * max(abs(lambda)). Negative eigenvalues retain their sign. Input is scaled before factoring; neither input is mutated. Symmetry is checked relative to matrix scale and the lower triangle defines the system within that tolerance. Zero systems produce zero solutions. Throws on invalid shape, nonfinite data, numerical overflow, or nonconvergence; never silently adds jitter. Not a general SVD.

Parameters
systemSquare coefficient matrix, including 0-by-0.
rightMatrix with system.rows() rows, possibly zero columns.
methodOptional output reporting the selected factorization.
Returns
Owning solution with the same shape as right.

Definition at line 269 of file aigenlib.cpp.

Variable Documentation

◆ max_extent

std::size_t dipla::aigenlib::max_extent = 2601
inlineconstexpr

Maximum matrix extent, matching the current dense GP grid ceiling.

Definition at line 33 of file aigenlib.hpp.

◆ pseudoinverse_relative_cutoff

double dipla::aigenlib::pseudoinverse_relative_cutoff = 1e-15
inlineconstexpr

Relative spectral cutoff shared with the Eigen reference implementation.

Definition at line 35 of file aigenlib.hpp.