Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

essy-nnls

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

essy-nnls - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "essy-nnls",
"version": "1.0.0",
"version": "1.0.1",
"description": "Wrapper for native C non-negative least squares (NNLS) algorithm.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,2 +6,13 @@ ## README ##

### Documentation ###
The package exposes a single function `NNLS(a, b, m, n)`.
`a {Float32Array}` A flat m x n matrix. m0n0, m1,n0, m2,n0 ... mN,nN.
`b {Float32Array}` An m-length vector.
`m {Number}` Number of rows.
`n {Number}` Number of columns.
Returns an n-length `Float32Array`.
### Example usage. ###

@@ -14,10 +25,10 @@

const a = new Float32Array(8);
a[0] = 0.0372;
a[1] = 0.6861;
a[2] = 0.6233;
a[3] = 0.6344;
a[4] = 0.2869;
a[5] = 0.7071;
a[6] = 0.6245;
a[7] = 0.6170;
a[0] = 0.0372; // m0, n0
a[1] = 0.6861; // m1, n0
a[2] = 0.6233; // m2, n0
a[3] = 0.6344; // m3, n0
a[4] = 0.2869; // m0, n1
a[5] = 0.7071; // m1, n1
a[6] = 0.6245; // m2, n1
a[7] = 0.6170; // m3, n1

@@ -24,0 +35,0 @@ const b = new Float32Array(4);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc