Skip to main content

solve_linear_system

solve_linear_system(A, x, size) ⇒ boolean

Solve linear equations Ax = b using Crout's method. Input is square matrix A and load vector b. Solution x is written over load vector. The dimension of the matrix is specified in size. If error is found, method returns a 0.

Kind: global function
Returns: boolean - true if solution found, false if factorization fails
See: https://github.com/Kitware/VTK/blob/af928016f4041ad8a6a193d032355b909721fc95/Common/Core/vtkMath.cxx

ParamTypeDescription
AArray.<number> | Float32Array | Float64ArrayMatrix of coefficients
xArray.<number> | Float32Array | Float64ArrayVector of right-hand constants for each equation, resulting solution for variables will also be written here
sizenumbersize of the system. Size 1 means a single variable and a single equation, 2 means a 2 variable equation system etc