struct

LA::Utils::LUMatrix(T)

Inherits Struct / Value / Object

Struct holding lu-decomposition of a matrix

Can be used to solve linear equations

Constructors

new(a : LA::Matrix(T), ipiv : Slice(Int32))
Source

Instance methods

a

L and U matrices packed in one matrix

Source
ipiv

indices of permutations

Source
size

Returns size of a system

Source
solve(b, transpose = LUTranspose::None, *, overwrite_b = false)

Solves A*x = b equations system with given b and returns x

transpose allows to solve A.t * x = b and A.conjt * x = b systems instead

if overwrite_b is true, b will be overriden in process of calculation

Uses getrs LAPACK routine

Source