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
|
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
-
covariance Square finite covariance, updated in place. mean Optional finite cell mean, updated in place. sensor Averaging operator. measurement Optional 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
-
covariance Square finite cell covariance. mask One selection bit per cell. sensor Averaging operator.
- Returns
- Expected trace reduction.
Definition at line 388 of file aigenlib.cpp.
◆ innovation()
Construct innovation covariance S = H P H^T + R from B = H P.
Validates rows and variances against the projected cell count.
- Parameters
-
sensor Averaging operator. projected Measurement-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
-
positions Grid-cell coordinates, at most max_extent. sigma2 Positive marginal variance. lengthscale Positive correlation length in the coordinates' units.
- Returns
- Dense symmetric prior.
Definition at line 324 of file aigenlib.cpp.
◆ observe()
Average field values through a sensor.
- Parameters
-
sensor Operator. field Finite cell values.
- Returns
- Measurements.
Definition at line 376 of file aigenlib.cpp.
◆ operator!=()
Exact inequality.
- Parameters
-
left First. right Second.
- Returns
- Any coordinate differs.
Definition at line 219 of file aigenlib.cpp.
◆ operator*() [1/2]
Scale coordinates.
- Parameters
-
scale Factor. point Input.
- Returns
- Scaled point.
Definition at line 212 of file aigenlib.cpp.
◆ operator*() [2/2]
Scale coordinates.
- Parameters
-
point Input. scale Factor.
- Returns
- Scaled point.
Definition at line 208 of file aigenlib.cpp.
◆ operator+()
Add points.
- Parameters
-
left First. right Second.
- Returns
- Sum.
Definition at line 206 of file aigenlib.cpp.
◆ operator-()
Subtract points.
- Parameters
-
left First. right Second.
- Returns
- Difference.
Definition at line 207 of file aigenlib.cpp.
◆ operator/()
Divide coordinates.
- Parameters
-
point Input. divisor Finite nonzero divisor.
- Returns
- Quotient.
Definition at line 213 of file aigenlib.cpp.
◆ operator==()
Exact equality.
- Parameters
-
left First. right Second.
- Returns
- All coordinates equal.
Definition at line 218 of file aigenlib.cpp.
◆ project()
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
-
sensor Averaging operator. covariance Square 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
-
system Square coefficient matrix, including 0-by-0. right Matrix with system.rows() rows, possibly zero columns. method Optional 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
|
inlineconstexpr |
Maximum matrix extent, matching the current dense GP grid ceiling.
Definition at line 33 of file aigenlib.hpp.
◆ pseudoinverse_relative_cutoff
|
inlineconstexpr |
Relative spectral cutoff shared with the Eigen reference implementation.
Definition at line 35 of file aigenlib.hpp.