Function Karana::Math::linSolveCOD

Function Karana::Math::linSolveCOD#

Function Documentation#

Mat Karana::Math::linSolveCOD(const Mat &A, const Mat &b, double threshold = Eigen::Default)#

Solve the linear system A x = b for x using a variant of QR decomposition. This is more numerically stable and equally fast to linSolveQR.

Parameters:
  • A – Coefficient matrix

  • b – Right-hand-side matrix/vector

  • threshold – Threshold below which we truncate pivots for numerical stability

Returns:

x matrix/vector that best solves A x = b