method
lup
v1_9_3_125 -
Show latest stable
- Class:
Matrix
lup()public
Returns the LUP decomposition of the matrix; see LUPDecomposition.
a = Matrix[[1, 2], [3, 4]] l, u, p = a.lup l.lower_triangular? # => true u.upper_triangular? # => true p.permutation? # => true l * u == a * p # => true a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]