1#ifndef FUSED_ALGORITHMS_KALMAN_H
2#define FUSED_ALGORITHMS_KALMAN_H
69 template <
typename T, my_
size_t N, my_
size_t M>
75 static_assert(is_floating_point_v<T>,
76 "kalman_gain requires a floating-point scalar type");
87 if (!S_inv_result.has_value())
92 auto &S_inv = S_inv_result.value();
116 template <
typename T, my_
size_t N, my_
size_t M>
123 static_assert(is_floating_point_v<T>,
124 "joseph_update requires a floating-point scalar type");
143 result = term1 + term2;
A discriminated union holding either a success value or an error.
Definition expected.h:86
Definition fused_matrix.h:12
FusedMatrix & setIdentity(void)
Definition fused_matrix.h:234
static FusedMatrix< T, Rows, Cols > matmul(const BaseExpr< LeftExpr > &mat1, const BaseExpr< RightExpr > &mat2)
Definition fused_matrix.h:255
FORCE_INLINE auto transpose_view() const noexcept
Definition fused_tensor.h:304
Global configuration for the tesseract tensor library.
A minimal, STL-free expected/result type for failable operations.
Matrix inverse with compile-time dispatch.
Runtime property descriptors and error codes for matrices.
Expected< FusedMatrix< T, N, N >, MatrixStatus > inverse(const FusedMatrix< T, N, N > &A)
Compute the inverse of a square matrix.
Definition inverse.h:65
Expected< FusedMatrix< T, N, M >, MatrixStatus > kalman_gain(const FusedMatrix< T, N, N > &P, const FusedMatrix< T, M, N > &H, const FusedMatrix< T, M, M > &R)
Compute the Kalman gain K = P·Hᵀ·(H·P·Hᵀ + R)⁻¹.
Definition kalman.h:70
FusedMatrix< T, N, N > joseph_update(const FusedMatrix< T, N, M > &K, const FusedMatrix< T, M, N > &H, const FusedMatrix< T, N, N > &P, const FusedMatrix< T, M, M > &R)
Joseph form covariance update: P' = (I-K·H)·P·(I-K·H)ᵀ + K·R·Kᵀ.
Definition kalman.h:117
MatrixStatus
Error codes for matrix decomposition and solver algorithms.
Definition matrix_traits.h:33
constexpr remove_reference_t< T > && move(T &&t) noexcept
Cast to rvalue reference (replacement for std::move).
Definition simple_type_traits.h:178
Tag type for constructing an Expected in the error state.
Definition expected.h:30
E error
The error value.
Definition expected.h:31