Comparing version 1.0.0 to 1.0.1
{ | ||
"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); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17326
42