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

Classes

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>
 Owning scalar vector; size validation belongs to the consuming operation.

Enumerations

enum class  SolveMethod { cholesky , pseudoinverse }
 Factorization selected for a solve. More...

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
 Maximum matrix extent, matching the current dense GP grid ceiling.
constexpr double pseudoinverse_relative_cutoff = 1e-15
 Relative spectral cutoff shared with the Eigen reference implementation.

Typedef Documentation

◆ Vector

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

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

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.

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.

◆ 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.

◆ 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.

◆ 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.

◆ observe()

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

Average field values through a sensor.

Parameters
sensorOperator.
fieldFinite cell values.
Returns
Measurements.

◆ operator!=()

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

Exact inequality.

Parameters
leftFirst.
rightSecond.
Returns
Any coordinate differs.

◆ operator*() [1/2]

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

Scale coordinates.

Parameters
scaleFactor.
pointInput.
Returns
Scaled point.

◆ operator*() [2/2]

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

Scale coordinates.

Parameters
pointInput.
scaleFactor.
Returns
Scaled point.

◆ operator+()

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

Add points.

Parameters
leftFirst.
rightSecond.
Returns
Sum.

◆ operator-()

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

Subtract points.

Parameters
leftFirst.
rightSecond.
Returns
Difference.

◆ operator/()

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

Divide coordinates.

Parameters
pointInput.
divisorFinite nonzero divisor.
Returns
Quotient.

◆ operator==()

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

Exact equality.

Parameters
leftFirst.
rightSecond.
Returns
All coordinates equal.

◆ 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.

◆ 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.

Variable Documentation

◆ max_extent

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

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

◆ pseudoinverse_relative_cutoff

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

Relative spectral cutoff shared with the Eigen reference implementation.