Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@penrose/linear-algebra

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@penrose/linear-algebra

linear-algebra-js is an optimized linear algebra library in pure Javascript. It supports both sparse and dense matrices, with routines to compute Cholesky, LU, and QR factorizations.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

About

linear-algebra-js is an optimized linear algebra library in pure Javascript. It supports both sparse and dense matrices, with routines to compute Cholesky, LU, and QR factorizations.

linear-algebra-js is implemented in asm.js to obtain the best possible performance for a Javascript program, and was compiled from a wrapper around the C++ library Eigen with emscripten. Future updates will compile the more optimized sparse matrix library Suitesparse to asm.js.

Detailed documentation and unit tests can be found in the docs and tests directories of this repository.

Code Snippet

// solve the linear system Ax = b, where A is a square sparse matrix
let A = SparseMatrix.identity(5, 5);
let b = DenseMatrix.ones(5, 1);

let lu = A.lu();
let x = lu.solveSquare(b);

b.scaleBy(5);
x = lu.solveSquare(b); // factorization is reused

Getting started

  • Clone this repository
git clone https://github.com/rohan-sawhney/linear-algebra-js.git
  • Include the files in the src directory in your browser or node js code.

Author

Rohan Sawhney

License

MIT

Keywords

linearalgebra

FAQs

Package last updated on 21 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts