Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ bench( pkg+'::instantiation', function benchmark( b ) {
var len;
var i;

len=100;
len = 100;
lambda = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
lambda[ i ] = ( uniform( EPS, 10.0 ));
Expand Down Expand Up @@ -90,7 +90,7 @@ bench( pkg+'::set:lambda', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
y = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
y[ i ] = uniform( EPS, 10.0 );
Expand Down Expand Up @@ -120,7 +120,7 @@ bench( pkg+':entropy', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( EPS, 10.0 );
Expand Down Expand Up @@ -151,7 +151,7 @@ bench( pkg+':kurtosis', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( EPS + 1.0, 11.0 );
Expand Down Expand Up @@ -182,7 +182,7 @@ bench( pkg+':mean', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( EPS, 10.0 );
Expand Down Expand Up @@ -213,7 +213,7 @@ bench( pkg+':median', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( EPS, 10.0 );
Expand Down Expand Up @@ -244,7 +244,7 @@ bench( pkg+':mode', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( 1.0 + EPS, 11.0 );
Expand Down Expand Up @@ -275,7 +275,7 @@ bench( pkg+':skewness', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( 1.0 + EPS, 11.0 );
Expand Down Expand Up @@ -306,7 +306,7 @@ bench( pkg+':stdev', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( 1.0 + EPS, 11.0 );
Expand Down Expand Up @@ -337,7 +337,7 @@ bench( pkg+':variance', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( 1.0 + EPS, 11.0 );
Expand Down Expand Up @@ -368,7 +368,7 @@ bench( pkg+':cdf', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( 0.0, 60.0 );
Expand Down Expand Up @@ -398,14 +398,14 @@ bench( pkg+':logpmf', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= discreteUniform( 0.0, 6.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
y = dist.logpmf( x[ i % len] );
y = dist.logpmf( x[ i % len ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand All @@ -428,14 +428,14 @@ bench( pkg+':mgf', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( 0.0, 1.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
y = dist.mgf( x[ i % len] );
y = dist.mgf( x[ i % len ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand All @@ -458,14 +458,14 @@ bench( pkg+':pmf', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= discreteUniform( 0.0, 8.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
y = dist.pmf( x[ i % len] );
y = dist.pmf( x[ i % len ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand All @@ -488,14 +488,14 @@ bench( pkg+':quantile', function benchmark( b ) {

lambda = 5.54;
dist = new Poisson( lambda );
len=100;
len = 100;
x = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
x[ i ]= uniform( 0.0, 1.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
y = dist.quantile( x[ i % len] );
y = dist.quantile( x[ i % len ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) {
len = 100;
lambda = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
lambda[ i ] = ( uniform( EPS, 20.0 ));
lambda[ i ] = uniform( EPS, 20.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) {
len = 100;
lambda = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
lambda[ i ] = ( uniform( EPS, 20.0 ));
lambda[ i ] = uniform( EPS, 20.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) {
len = 100;
lambda = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
lambda[ i ] = ( uniform( EPS, 20.0 ));
lambda[ i ] = uniform( EPS, 20.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ bench( pkg+':factory', function benchmark( b ) {
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
y = myquantile( p[ i % len] );
y = myquantile( p[ i % len ] );
if ( isnan( y ) ) {
b.fail( 'should not return NaN' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) {
len = 100;
lambda = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
lambda[ i ] = ( uniform( EPS, 20.0 ));
lambda[ i ] = uniform( EPS, 20.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bench( pkg, function benchmark( b ) {
len = 100;
lambda = new Float64Array( len );
for ( i = 0; i < len; i++ ) {
lambda[ i ] = ( uniform( EPS, 20.0 ));
lambda[ i ] = uniform( EPS, 20.0 );
}
b.tic();
for ( i = 0; i < b.iterations; i++ ) {
Expand Down