tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
Loading...
Searching...
No Matches
rank_update.h
Go to the documentation of this file.
1#ifndef FUSED_ALGORITHMS_RANK_UPDATE_H
2#define FUSED_ALGORITHMS_RANK_UPDATE_H
3
4#include "config.h"
6
36namespace matrix_algorithms
37{
38
49 template <typename T, my_size_t N>
51 const FusedMatrix<T, N, N> &F,
52 const FusedMatrix<T, N, N> &P,
53 const FusedMatrix<T, N, N> &Q)
54 {
56
57 auto tmp = FusedMatrix<T, N, N>::matmul(F, P);
58 result = FusedMatrix<T, N, N>::matmul(tmp, F.transpose_view()) + Q;
59 return result;
60 }
61
73 template <typename T, my_size_t N>
75 const FusedMatrix<T, N, N> &F,
76 const FusedMatrix<T, N, N> &P)
77 {
79
80 auto tmp = FusedMatrix<T, N, N>::matmul(F, P);
82 return result;
83 }
84
85} // namespace matrix_algorithms
86
87#endif // FUSED_ALGORITHMS_RANK_UPDATE_H
Definition fused_matrix.h:12
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.
Definition cholesky.h:52
FusedMatrix< T, N, N > symmetric_rank_k_update(const FusedMatrix< T, N, N > &F, const FusedMatrix< T, N, N > &P, const FusedMatrix< T, N, N > &Q)
Compute the symmetric rank-k update P' = F·P·Fᵀ + Q.
Definition rank_update.h:50