cholesky

1.2.0 • Public • Published

cholesky

standalone cholesky decomposition of a square matrix

Take an native javascript array representing a square matrix and returns the lower triangular decomposition. The row-major convention is used: mat[row][col]

Unlike other implementations, this module only uses native Arrays and does not modify any prototypes.

ExampleAPILicense

Example

cho = require('cholesky')
 
var tri = cho([[4, 12, -16], [12, 37, -43], [-16, -43, 98]])
console.log(tri[0]) // [2]
console.log(tri[1]) // [6, 1]
console.log(tri[2]) // [-8, 5, 3]

API

cholesky(array) => array

The module exports a single function that takes a row-major matrix in the form mat[row][col] and returns a new lower triangular matrix in the form [[a], [b,c], [d,e,f], ...]

License

Released under the MIT License

Readme

Keywords

Package Sidebar

Install

npm i cholesky

Weekly Downloads

8

Version

1.2.0

License

MIT

Last publish

Collaborators

  • hugov