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
|
strong |
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.
◆ 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.
◆ 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.
◆ 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.
◆ observe()
Average field values through a sensor.
- Parameters
-
sensor Operator. field Finite cell values.
- Returns
- Measurements.
◆ operator!=()
Exact inequality.
- Parameters
-
left First. right Second.
- Returns
- Any coordinate differs.
◆ operator*() [1/2]
Scale coordinates.
- Parameters
-
scale Factor. point Input.
- Returns
- Scaled point.
◆ operator*() [2/2]
Scale coordinates.
- Parameters
-
point Input. scale Factor.
- Returns
- Scaled point.
◆ operator+()
Add points.
- Parameters
-
left First. right Second.
- Returns
- Sum.
◆ operator-()
Subtract points.
- Parameters
-
left First. right Second.
- Returns
- Difference.
◆ operator/()
Divide coordinates.
- Parameters
-
point Input. divisor Finite nonzero divisor.
- Returns
- Quotient.
◆ operator==()
Exact equality.
- Parameters
-
left First. right Second.
- Returns
- All coordinates equal.
◆ 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.
◆ 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.
Variable Documentation
◆ max_extent
|
inlineconstexpr |
Maximum matrix extent, matching the current dense GP grid ceiling.
◆ pseudoinverse_relative_cutoff
|
inlineconstexpr |
Relative spectral cutoff shared with the Eigen reference implementation.