Skip to content

Commit 0bb51da

Browse files
chore: stuff from code review
1 parent 2fdc789 commit 0bb51da

File tree

6 files changed

+7
-13
lines changed

6 files changed

+7
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Returns the differential entropy for a beta distribution with first shape parame
177177

178178
```c
179179
double y = stdlib_base_dists_beta_entropy( 1.0, 1.0 );
180-
// returns ~0.0
180+
// returns 0.0
181181
```
182182

183183
The function accepts the following arguments:
@@ -229,7 +229,7 @@ int main( void ) {
229229
alpha = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
230230
beta = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
231231
y = stdlib_base_dists_beta_entropy( alpha, beta );
232-
printf( "α: %1f, β: %1f, h(X;α,β): %lf\n", alpha, beta, y );
232+
printf( "α: %1f. β: %1f. h(X;α,β): %lf\n", alpha, beta, y );
233233
}
234234
}
235235
```

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ bench( pkg, function benchmark( b ) {
4040

4141
len = 100;
4242
alpha = new Float64Array( len );
43-
for ( i = 0; i < len; i++ ) {
44-
alpha[ i ] = uniform( EPS, 10.0 );
45-
}
4643
beta = new Float64Array( len );
4744
for ( i = 0; i < len; i++ ) {
45+
alpha[ i ] = uniform( EPS, 10.0 );
4846
beta[ i ] = uniform( EPS, 10.0 );
4947
}
5048

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ bench( pkg+'::native', opts, function benchmark( b ) {
4949

5050
len = 100;
5151
alpha = new Float64Array( len );
52-
for ( i = 0; i < len; i++ ) {
53-
alpha[ i ] = uniform( EPS, 10.0 );
54-
}
5552
beta = new Float64Array( len );
5653
for ( i = 0; i < len; i++ ) {
54+
alpha[ i ] = uniform( EPS, 10.0 );
5755
beta[ i ] = uniform( EPS, 10.0 );
5856
}
5957

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ static double benchmark( void ) {
102102

103103
for ( i = 0; i < 100; i++ ) {
104104
alpha[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
105-
}
106-
for ( i = 0; i < 100; i++ ) {
107105
beta[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
108106
}
109107

lib/node_modules/@stdlib/stats/base/dists/beta/entropy/examples/c/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ int main( void ) {
3636
alpha = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
3737
beta = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
3838
y = stdlib_base_dists_beta_entropy( alpha, beta );
39-
printf( "α: %1f, β: %1f, h(X;α,β): %lf\n", alpha, beta, y );
39+
printf( "α: %1f. β: %1f. h(X;α,β): %lf\n", alpha, beta, y );
4040
}
4141
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
*
2626
* @param alpha first shape parameter
2727
* @param beta second shape parameter
28-
* @returns differential entropy
28+
* @return differential entropy
2929
*
3030
* @example
3131
* double y = stdlib_base_dists_beta_entropy( 1.0, 1.0 );
32-
* // returns ~0.0
32+
* // returns 0.0
3333
*/
3434
double stdlib_base_dists_beta_entropy( const double alpha, const double beta ) {
3535
double out;

0 commit comments

Comments
 (0)