Skip to content

Commit 815d72a

Browse files
chore: stuff from code review
1 parent e335eee commit 815d72a

File tree

6 files changed

+7
-13
lines changed

6 files changed

+7
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Returns the differential entropy of a gamma distribution with shape parameter `a
176176

177177
```c
178178
double y = stdlib_base_dists_gamma_entropy( 1.0, 1.0 );
179-
// returns ~1.0
179+
// returns 1.0
180180
```
181181

182182
The function accepts the following arguments:
@@ -227,7 +227,7 @@ int main( void ) {
227227
alpha = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 );
228228
beta = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 10.0 ) ;
229229
y = stdlib_base_dists_gamma_entropy( alpha, beta );
230-
printf( "α: %1f, β: %1f, h(X;α,β): %lf\n", alpha , beta , y );
230+
printf( "α: %1f. β: %1f. h(X;α,β): %lf\n", alpha , beta , y );
231231
}
232232
}
233233
```

lib/node_modules/@stdlib/stats/base/dists/gamma/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/gamma/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/gamma/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/gamma/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_gamma_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/gamma/entropy/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
*
2727
* @param alpha Shape parameter
2828
* @param beta Rate parameter
29-
* @returns differential entropy
29+
* @return differential entropy
3030
*
3131
* @example
3232
* double y = stdlib_base_dists_gamma_entropy( 1.0, 1.0 );
33-
* // returns ~1.0
33+
* // returns 1.0
3434
*/
3535
double stdlib_base_dists_gamma_entropy( const double alpha, const double beta ) {
3636
double out;

0 commit comments

Comments
 (0)