Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cholesky

hville61MIT1.2.0

standalone cholesky decomposition of a square matrix

LLt, LDL, cholesky, matrix

readme

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

changelog

Change Log

[Unreleased]

Removed, Changed, Deprecated, Added, Fixed, Security

  • one fewer array created

[1.2.0] - 2017-12-05

Changed

  • Simplified project structure
  • JSDoc and type annotation

[1.0.0] - 2016-09-17

Added

  • First publish