Comparing version 1.1.0 to 1.2.0
@@ -0,0 +0,0 @@ // https://en.wikipedia.org/wiki/Cholesky_decomposition |
{ | ||
"name": "cholesky", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "standalone cholesky decomposition of a square matrix", | ||
"keywords": [ | ||
"LLt", "LDL", "cholesky", "matrix" | ||
"LLt", | ||
"LDL", | ||
"cholesky", | ||
"matrix" | ||
], | ||
"author": "Hugo Villeneuve", | ||
"main": "./cholesky.js", | ||
"private": false, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"cotest": "^1.5.0" | ||
"@types/node": "^8.0.55", | ||
"cotest": "^3.0.0" | ||
}, | ||
@@ -21,9 +23,5 @@ "repository": { | ||
"test": "node test", | ||
"prepublish": "npm test" | ||
"prepublishOnly": "npm test" | ||
}, | ||
"license": "MIT", | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
} | ||
"license": "MIT" | ||
} | ||
20
test.js
var t = require('cotest'), | ||
cholesky = require('./cholesky'), | ||
cholesky = require('./'), | ||
ldl = require('./ldl') | ||
//mult of square matrix or triangular matrix for testing | ||
/** | ||
* @param {Array<Array<number>>} L | ||
* @return {Array<Array<number>>} | ||
*/ | ||
function msq(L) { | ||
var dim = L.length, | ||
res = [] | ||
res = Array(dim) | ||
for (var i=0; i<dim; ++i) { | ||
res[i] = [] | ||
res[i] = Array(dim) | ||
for (var j=0; j<dim; ++j) { | ||
@@ -19,3 +24,3 @@ res[i][j] = 0 | ||
function rndM(dim, scale, shift) { //random symetrical matrix | ||
var res = [] | ||
var res = Array(dim) | ||
for (var i=0; i<dim; ++i) { | ||
@@ -38,2 +43,3 @@ res[i] = [] | ||
} | ||
function testbench(fcn, src) { | ||
@@ -54,2 +60,3 @@ var st = process.hrtime(), | ||
] | ||
var evilMatrix = [ | ||
@@ -61,3 +68,6 @@ rndM(10,0.3,0.1), | ||
var ref = res = sumref = sumres = {ms:0, er:0} | ||
var ref = {ms:0, er:0}, | ||
res = ref, | ||
sumref = ref, | ||
sumres = ref | ||
@@ -64,0 +74,0 @@ goodMatrix.forEach(function(m,i) { |
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
6693
7
155
2