method

lup

Importance_1
v1_9_3_392 - Show latest stable - 0 notes - 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)]
Show source
Register or log in to add new notes.