class
SushiDSP::dk::DenseLu< 2 >
template <>Closed-form 2x2 LU with partial pivoting; N = 2 is the shape of every triode block and of the D6c clip stage's diode pair, so it is the hot Jacobian size in the tree.
- Declared in
include/SushiDSP/math/dk/DenseLu.hpp
Static public attributes
static constexpr double kMinimumPivot = 1e-300Smallest pivot magnitude accepted as non-singular.
Public member functions
bool factorise(const std::array< std::array< double, 2 >, 2 > &matrix)Factorises the 2x2 matrix into the internal L/U storage.
Parameters
matrixThe system matrix; not modified.
Returns
False when a pivot is numerically zero; solve() must not be called after that.
bool factorise(const std::array< std::array< double, 2 >, 2 > &matrix, std::size_t order)Factorises the leading order x order block of the 2x2 matrix.
Parameters
matrixThe system matrix; only its leading block is read, and it is not modified.
orderActive dimension, 0, 1, or 2. An order of zero always succeeds.
Returns
False when a pivot is numerically zero; solve() must not be called after that.
void solve(const std::array< double, 2 > &right_hand_side, std::array< double, 2 > &solution) constSolves the 2x2 system A x = b using the factors from the last factorise().
Parameters
right_hand_sideb.
solutionx, overwritten.
void solve(const std::array< double, 2 > &right_hand_side, std::array< double, 2 > &solution, std::size_t order) constSolves the leading order x order block using the factors from the last factorise() of the same order.
Parameters
right_hand_sideb; only its leading order entries are read.
solutionx; only its leading order entries are written.
orderActive dimension, 0, 1, or 2, matching the last factorise().

