pub struct ObservationMatrixMutBuffer<const OBSERVATIONS: usize, const STATES: usize, T, M>(/* private fields */)
where
M: MatrixMut<OBSERVATIONS, STATES, T>;Expand description
Mutable buffer for the observation matrix (num_controls × num_states), typically denoted “H”.
§Regular Kalman Filters
This matrix represents the observation model. It defines the relationship between the state and the measurements obtained from the system. The matrix ( H ) is used to map the predicted state into the measurement space, allowing the Kalman filter to compare the predicted measurements with the actual measurements for updating the state estimate.
§Extended Kalman Filters
This matrix represents the observation model in the context of the Extended Kalman Filter (EKF). It defines the relationship between the state and the measurements obtained from the system. In the EKF, the matrix ( H ) is the Jacobian of the measurement function with respect to the state, evaluated at the current state estimate. This Jacobian matrix linearizes the non-linear measurement function around the current estimate, allowing the EKF to map the predicted state into the measurement space for comparison with the actual measurements during the update step.
§Example
use minikalman::buffers::types::ObservationMatrixMutBuffer;
use minikalman::prelude::*;
// From owned data
let buffer = ObservationMatrixMutBuffer::new(MatrixData::new_array::<2, 2, 4, f32>([0.0; 4]));
// From a reference
let mut data = [0.0; 4];
let buffer = ObservationMatrixMutBuffer::<2, 2, f32, _>::from(data.as_mut_slice());Implementations§
Trait Implementations§
Source§impl<'a, const OBSERVATIONS: usize, const STATES: usize, T> From<&'a mut [T]> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, MatrixDataMut<'a, OBSERVATIONS, STATES, T>>
impl<'a, const OBSERVATIONS: usize, const STATES: usize, T> From<&'a mut [T]> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, MatrixDataMut<'a, OBSERVATIONS, STATES, T>>
Source§impl<const OBSERVATIONS: usize, const STATES: usize, const TOTAL: usize, T> From<[T; TOTAL]> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, MatrixDataArray<OBSERVATIONS, STATES, TOTAL, T>>
impl<const OBSERVATIONS: usize, const STATES: usize, const TOTAL: usize, T> From<[T; TOTAL]> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, MatrixDataArray<OBSERVATIONS, STATES, TOTAL, T>>
Source§fn from(value: [T; TOTAL]) -> Self
fn from(value: [T; TOTAL]) -> Self
Source§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> Index<usize> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> Index<usize> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
Source§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> IndexMut<usize> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> IndexMut<usize> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
Source§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> IntoInnerData for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T> + IntoInnerData,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> IntoInnerData for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T> + IntoInnerData,
type Target = <M as IntoInnerData>::Target
fn into_inner(self) -> Self::Target
Source§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> Matrix<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> Matrix<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
Source§fn inspect<F, O>(&self, f: F) -> Owhere
F: FnMut(&Self) -> O,
fn inspect<F, O>(&self, f: F) -> Owhere
F: FnMut(&Self) -> O,
Source§fn get_column_copy(&self, column: usize, col_data: &mut [T])where
T: Copy,
fn get_column_copy(&self, column: usize, col_data: &mut [T])where
T: Copy,
Source§fn get_row_copy(&self, row: usize, row_data: &mut [T])where
T: Copy,
fn get_row_copy(&self, row: usize, row_data: &mut [T])where
T: Copy,
Source§fn copy<Target>(&self, target: &mut Target)
fn copy<Target>(&self, target: &mut Target)
Source§fn mult_buffered<const U: usize, B, C>(&self, b: &B, c: &mut C, baux: &mut [T])
fn mult_buffered<const U: usize, B, C>(&self, b: &B, c: &mut C, baux: &mut [T])
C = A * B. This method
uses an auxiliary buffer for keeping one row of B cached. This might
improve performance on very wide matrices but is generally slower than
Matrix::mult. Read moreSource§fn mult<const U: usize, B, C>(&self, b: &B, c: &mut C)
fn mult<const U: usize, B, C>(&self, b: &B, c: &mut C)
C = A * B. Read moreSource§fn mult_rowvector<X, C>(&self, x: &X, c: &mut C)
fn mult_rowvector<X, C>(&self, x: &X, c: &mut C)
C = A * x. Read moreSource§fn multadd_rowvector<X, C>(&self, x: &X, c: &mut C)
fn multadd_rowvector<X, C>(&self, x: &X, c: &mut C)
C = C + A * x. Read moreSource§fn multadd_transb<const U: usize, B, C>(&self, b: &B, c: &mut C)
fn multadd_transb<const U: usize, B, C>(&self, b: &B, c: &mut C)
B and adds the result to
C such that C = C + A * B'. Read moreSource§fn multscale_transb<const U: usize, B, C>(&self, b: &B, scale: T, c: &mut C)
fn multscale_transb<const U: usize, B, C>(&self, b: &B, scale: T, c: &mut C)
B and scales the result such that
C = A * B' * scale. Read moreSource§fn add_inplace_b<B>(&self, b: &mut B)where
B: MatrixMut<ROWS, COLS, T>,
T: MatrixDataType,
fn add_inplace_b<B>(&self, b: &mut B)where
B: MatrixMut<ROWS, COLS, T>,
T: MatrixDataType,
B = A + B Read moreSource§fn sub_inplace_b<B>(&self, b: &mut B)where
B: MatrixMut<ROWS, COLS, T>,
T: MatrixDataType,
fn sub_inplace_b<B>(&self, b: &mut B)where
B: MatrixMut<ROWS, COLS, T>,
T: MatrixDataType,
B = A - B. Read moreSource§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> MatrixMut<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> MatrixMut<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
Source§fn apply<F, O>(&mut self, f: F) -> Owhere
F: FnMut(&mut Self) -> O,
fn apply<F, O>(&mut self, f: F) -> Owhere
F: FnMut(&mut Self) -> O,
Source§fn set_all(&mut self, value: T)where
T: Copy,
fn set_all(&mut self, value: T)where
T: Copy,
Source§fn set_symmetric(&mut self, row: usize, column: usize, value: T)where
T: Copy,
fn set_symmetric(&mut self, row: usize, column: usize, value: T)where
T: Copy,
Source§fn add_inplace_a<B>(&mut self, b: &B)where
B: Matrix<ROWS, COLS, T>,
T: MatrixDataType,
fn add_inplace_a<B>(&mut self, b: &B)where
B: Matrix<ROWS, COLS, T>,
T: MatrixDataType,
A = A + B Read moreSource§fn sub_inplace_a<B>(&mut self, b: &B)where
B: Matrix<ROWS, COLS, T>,
T: MatrixDataType,
fn sub_inplace_a<B>(&mut self, b: &B)where
B: Matrix<ROWS, COLS, T>,
T: MatrixDataType,
A = A - B. Read moreSource§fn cholesky_decompose_lower(&mut self) -> boolwhere
T: MatrixDataType,
fn cholesky_decompose_lower(&mut self) -> boolwhere
T: MatrixDataType,
Source§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> ObservationMatrix<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> ObservationMatrix<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
Source§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> ObservationMatrixMut<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> ObservationMatrixMut<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
Source§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> RowMajorSequentialData<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> RowMajorSequentialData<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
Source§impl<const OBSERVATIONS: usize, const STATES: usize, T, M> RowMajorSequentialDataMut<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> RowMajorSequentialDataMut<OBSERVATIONS, STATES, T> for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: MatrixMut<OBSERVATIONS, STATES, T>,
Auto Trait Implementations§
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> Freeze for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: Freeze,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> RefUnwindSafe for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> Send for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> Sync for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> Unpin for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>
impl<const OBSERVATIONS: usize, const STATES: usize, T, M> UnwindSafe for ObservationMatrixMutBuffer<OBSERVATIONS, STATES, T, M>where
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<const N: usize, T, M> ColumnVector<N, T> for Mwhere
M: Matrix<1, N, T>,
impl<const N: usize, T, M> ColumnVector<N, T> for Mwhere
M: Matrix<1, N, T>,
Source§impl<const N: usize, T, M> ColumnVectorMut<N, T> for Mwhere
M: MatrixMut<1, N, T>,
impl<const N: usize, T, M> ColumnVectorMut<N, T> for Mwhere
M: MatrixMut<1, N, T>,
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<const N: usize, T, M> RowVectorMut<N, T> for Mwhere
M: MatrixMut<N, 1, T>,
impl<const N: usize, T, M> RowVectorMut<N, T> for Mwhere
M: MatrixMut<N, 1, T>,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<const N: usize, T, M> SquareMatrix<N, T> for Mwhere
M: Matrix<N, N, T>,
impl<const N: usize, T, M> SquareMatrix<N, T> for Mwhere
M: Matrix<N, N, T>,
Source§fn invert_l_cholesky<I>(&self, inverse: &mut I)where
I: SquareMatrixMut<N, T>,
T: MatrixDataType,
fn invert_l_cholesky<I>(&self, inverse: &mut I)where
I: SquareMatrixMut<N, T>,
T: MatrixDataType,
MatrixDataMut::cholesky_decompose_lower. Read moreSource§impl<const N: usize, T, M> SquareMatrixMut<N, T> for Mwhere
M: MatrixMut<N, N, T>,
impl<const N: usize, T, M> SquareMatrixMut<N, T> for Mwhere
M: MatrixMut<N, N, T>,
Source§fn make_identity(&mut self)
fn make_identity(&mut self)
Source§fn make_scalar(&mut self, diagonal: T)
fn make_scalar(&mut self, diagonal: T)
Source§fn set_diagonal_to_scalar(&mut self, value: T)where
T: Copy,
fn set_diagonal_to_scalar(&mut self, value: T)where
T: Copy,
Source§fn make_comatrix(&mut self, diagonal: T, off_diagonal: T)where
T: Copy,
fn make_comatrix(&mut self, diagonal: T, off_diagonal: T)where
T: Copy,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.