Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
ndarray-crout-decomposition
Advanced tools
LU decomposition using the crout algorithm
var ndarray = require('ndarray');
var zeros = require('zeros');
var show = require('ndarray-show');
var crout = require('ndarray-crout-decomposition');
var A = ndarray([ 4, 3, 6, 3 ], [ 2, 2 ]);
var L = zeros([ 2, 2 ]);
var U = zeros([ 2, 2 ]);
crout(A, L, U);
console.log('L=\n' + show(L));
console.log('U=\n' + show(U));
output:
L=
4.000 0.000
3.000 -1.500
U=
1.000 1.500
0.000 1.000
or to save space, you can use a single matrix to store the L and U values:
var ndarray = require('ndarray');
var zeros = require('zeros');
var show = require('ndarray-show');
var crout = require('ndarray-crout-decomposition');
var A = ndarray([ 4, 3, 6, 3 ], [ 2, 2 ]);
var LU = zeros([ 2, 2 ]);
crout(A, LU);
console.log('LU=\n' + show(LU));
output:
LU=
4.000 1.500
3.000 -1.500
var crout = require('ndarray-crout-decomposition')
Decompose the matrix A
into L
and U
, mutating L
and U
in-place.
A
is not modified.
If you don't pass in a U
matrix, L
will be used to store both the L
and
U
values, omitting the diagonal of ones from U
to make room.
If A
was non-square or the algorithm could not find a solution, ok
is
false
. Otherwise ok
is true
.
With npm do:
npm install ndarray-crout-decomposition
MIT
FAQs
LU decomposition using the crout algorithm
The npm package ndarray-crout-decomposition receives a total of 19,619 weekly downloads. As such, ndarray-crout-decomposition popularity was classified as popular.
We found that ndarray-crout-decomposition demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.