![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
robust-linear-solve
Advanced tools
Readme
An exact linear solver for low dimensional systems.
var linSolve = require("robust-linear-solve")
var A = [ [1, 2, 3],
[3, 2, 1],
[0, 0, 1] ]
var b = [1, 2, 3]
console.log(linSolve(A, b))
Output:
[ [ -14 ], [ 23 ], [ -12 ], [ -4 ] ]
npm install robust-linear-solve
require("robust-linear-solve")(A, b)
Finds the exact solution to a linear system, Ax = b
, using Cramer's rule.
A
is a n
-by-n
square matrix, encoded as an array of arraysb
is an n
dimensional vector encoded as a length n
arrayReturns A projective n+1
dimensional vector of non-overlapping increasing sequences representing the exact solution to the system. That is to say, if x
is the returned solution then in psuedocode we have the following constraint:
A [ x[0], x[1], ... , x[n-1] ] = b * x[n]
Or in other words, the solution is given by the quotient:
[ x[0] / x[n], x[1] / x[n], .... , x[n-1] / x[n] ]
If the system is not solvable, then the last coefficient, x[n]
will be 0
.
Note For up to n=5
, you can avoid the extra method look up by calling linSolve[n]
directly.
(c) 2014 Mikola Lysenko. MIT License
FAQs
Exactly solve a low dimensional linear system
The npm package robust-linear-solve receives a total of 19,543 weekly downloads. As such, robust-linear-solve popularity was classified as popular.
We found that robust-linear-solve demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.