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

gaussian

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

gaussian - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

.github/workflows/tests.yml

2

bower.json
{
"name": "gaussian",
"version": "1.1.0",
"version": "1.2.0",
"homepage": "https://github.com/errcw/gaussian",

@@ -5,0 +5,0 @@ "authors": [

{
"name": "gaussian",
"version": "1.1.0",
"version": "1.2.0",
"main": "lib/gaussian.js",

@@ -5,0 +5,0 @@ "scripts": [

(function(exports) {
const generateGaussian = require('./box-muller');
// Complementary error function

@@ -101,2 +103,11 @@ // From Numerical Recipes in C 2e p221

// Generate [num] random samples
Gaussian.prototype.random = function(num){
let mean = this.mean;
let std = this.standardDeviation;
return Array(num).fill(0).map(() => {
return generateGaussian(mean,std)
})
};
var gaussian = function(mean, variance) {

@@ -103,0 +114,0 @@ return new Gaussian(mean, variance);

{
"name": "gaussian",
"description": "A JavaScript model of a Gaussian distribution",
"version": "1.1.0",
"version": "1.2.0",
"author": "Eric Woroshow <eric@ericw.ca>",

@@ -17,3 +17,4 @@ "homepage": "https://github.com/errcw/gaussian",

"scripts": {
"test": "nodeunit test"
"test": "jest",
"test:coverage": "jest --coverage"
},

@@ -23,8 +24,15 @@ "engines": {

},
"keywords": [ "gaussian", "normal", "distribution" ],
"dependencies": {
"keywords": [
"gaussian",
"normal",
"distribution"
],
"devDependencies": {
"jest": "26.6.3"
},
"devDependencies": {
"nodeunit": ">= 0.7.x"
"prettier": {
"semi": true,
"singleQuote": true,
"tabWidth": 2
}
}

@@ -34,1 +34,4 @@ # gaussian

- `scale(c)`: returns the result of scaling this distribution by the given constant
### Generation Function
- `random(n)`: returns an array of generated `n` random samples correspoding to the Gaussian parameters.

Sorry, the diff of this file is not supported yet

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