nstatistics
Version:
Solve equations using numerical methods, linear álgebra and solver of linear equation system
13 lines (12 loc) • 368 B
JavaScript
const covMatrix = require('./cov-matrix');
module.exports = function(cb) {
const self = this;
if (typeof cb !== 'function') return covMatrix.call(self);
return new Promise((full, rej) => {
try {
full(cb.call(self, null, covMatrix.call(self)));
} catch (error) {
rej(cb.call(self, error, null));
}
});
};