Skip to content

Commit adff97d

Browse files
chore: minor updates
1 parent 2c44090 commit adff97d

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

lib/node_modules/@stdlib/stats/base/dists/beta/logpdf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ for ( i = 0; i < 10; i++ ) {
197197

198198
#### stdlib_base_dists_beta_logpdf( x, alpha, beta )
199199

200-
Evaluates the natural logarithm of the probability density function (logPDF) for a beta distribution with first shape parameter `alpha` and second shape parameter `beta` at a value `x`.
200+
Evaluates the natural logarithm of the probability density function (logPDF) for a beta distribution with first shape parameter `alpha` and second shape parameter `beta`.
201201

202202
```c
203203
double y = stdlib_base_dists_beta_logpdf( 0.5, 1.0, 1.0 );

lib/node_modules/@stdlib/stats/base/dists/beta/logpdf/benchmark/benchmark.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@ bench( pkg, function benchmark( b ) {
4242
len = 100;
4343
alpha = new Float64Array( len );
4444
for ( i = 0; i < len; i++ ) {
45-
alpha[ i ] = uniform( EPS, 2.0 );
45+
alpha[ i ] = uniform( EPS, 100.0 );
4646
}
4747
beta = new Float64Array( len );
4848
for ( i = 0; i < len; i++ ) {
4949
beta[ i ] = uniform( EPS, 100.0 );
5050
}
5151
x = new Float64Array( len );
5252
for ( i = 0; i < len; i++ ) {
53-
x[ i ] = uniform( EPS, 100.0 );
53+
x[ i ] = uniform( EPS, 2.0 );
5454
}
5555

5656
b.tic();
5757
for ( i = 0; i < b.iterations; i++ ) {
58-
y = logpdf( x[ i%100 ], alpha[ i%100 ], beta[ i%100 ] );
58+
y = logpdf( x[ i % len ], alpha[ i % len ], beta[ i % len ] );
5959
if ( isnan( y ) ) {
6060
b.fail( 'should not return NaN' );
6161
}
@@ -89,7 +89,7 @@ bench( pkg+':factory', function benchmark( b ) {
8989

9090
b.tic();
9191
for ( i = 0; i < b.iterations; i++ ) {
92-
y = mylogpdf( x[ i%100 ] );
92+
y = mylogpdf( x[ i % len ] );
9393
if ( isnan( y ) ) {
9494
b.fail( 'should not return NaN' );
9595
}

lib/node_modules/@stdlib/stats/base/dists/beta/logpdf/benchmark/benchmark.native.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ bench( pkg+'::native', opts, function benchmark( b ) {
5151
len = 100;
5252
alpha = new Float64Array( len );
5353
for ( i = 0; i < len; i++ ) {
54-
alpha[ i ] = uniform( EPS, 2.0 );
54+
alpha[ i ] = uniform( EPS, 100.0 );
5555
}
5656
beta = new Float64Array( len );
5757
for ( i = 0; i < len; i++ ) {
5858
beta[ i ] = uniform( EPS, 100.0 );
5959
}
6060
x = new Float64Array( len );
6161
for ( i = 0; i < len; i++ ) {
62-
x[ i ] = uniform( EPS, 100.0 );
62+
x[ i ] = uniform( EPS, 2.0 );
6363
}
6464

6565
b.tic();
6666
for ( i = 0; i < b.iterations; i++ ) {
67-
y = logpdf( x[ i%100 ], alpha[ i%100 ], beta[ i%100 ] );
67+
y = logpdf( x[ i % len ], alpha[ i % len ], beta[ i % len ] );
6868
if ( isnan( y ) ) {
6969
b.fail( 'should not return NaN' );
7070
}

lib/node_modules/@stdlib/stats/base/dists/beta/logpdf/benchmark/c/benchmark.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ static double benchmark( void ) {
102102
int i;
103103

104104
for ( i = 0; i < 100; i++ ) {
105-
alpha[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 2.0 );
105+
alpha[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 100.0 );
106106
}
107107
for ( i = 0; i < 100; i++ ) {
108-
beta[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
108+
beta[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 100.0 );
109109
}
110110
for ( i = 0; i < 100; i++ ) {
111-
x[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
111+
x[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 2.0 );
112112
}
113113

114114
t = tic();

lib/node_modules/@stdlib/stats/base/dists/beta/logpdf/include/stdlib/stats/base/dists/beta/logpdf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727
#endif
2828

2929
/**
30-
* Evaluates the natural logarithm of the probability density function (logPDF) for a beta distribution with first shape parameter `alpha` and second shape parameter `beta` at a value `x`.
30+
* Evaluates the natural logarithm of the probability density function (logPDF) for a beta distribution with first shape parameter `alpha` and second shape parameter `beta`.
3131
*/
3232
double stdlib_base_dists_beta_logpdf( const double x, const double alpha, const double beta );
3333

lib/node_modules/@stdlib/stats/base/dists/beta/logpdf/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "stdlib/constants/float64/ninf.h"
2626

2727
/**
28-
* Evaluates the natural logarithm of the probability density function (logPDF) for a beta distribution with first shape parameter `alpha` and second shape parameter `beta` at a value `x`.
28+
* Evaluates the natural logarithm of the probability density function (logPDF) for a beta distribution with first shape parameter `alpha` and second shape parameter `beta`.
2929
*
3030
* @param x input value
3131
* @param alpha first shape parameter

0 commit comments

Comments
 (0)