mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
[wpimath] Remove redundant transposes on symmetric matrices (#8131)
This likely won't have a performance impact since it only affects matrix traversal order, but it does simplify the code.
This commit is contained in:
@@ -128,7 +128,11 @@ Eigen::Matrix<double, States, States> DARE(
|
||||
//
|
||||
// V₂ᵀ = W.solve(Gₖᵀ)
|
||||
// V₂ = W.solve(Gₖᵀ)ᵀ
|
||||
StateMatrix V_2 = W_solver.solve(G_k.transpose()).transpose();
|
||||
//
|
||||
// Since W, Gₖ, and Hₖ are symmetric, drop the transposes on Gₖ and V₂.
|
||||
//
|
||||
// V₂ = W.solve(Gₖ)
|
||||
StateMatrix V_2 = W_solver.solve(G_k);
|
||||
|
||||
// Gₖ₊₁ = Gₖ + AₖV₂Aₖᵀ
|
||||
// Hₖ₊₁ = Hₖ + V₁ᵀHₖAₖ
|
||||
|
||||
Reference in New Issue
Block a user