File tree Expand file tree Collapse file tree 4 files changed +5
-28
lines changed
lib/node_modules/@stdlib/stats/base/dists/gamma/entropy Expand file tree Collapse file tree 4 files changed +5
-28
lines changed Original file line number Diff line number Diff line change @@ -181,8 +181,8 @@ double y = stdlib_base_dists_gamma_entropy( 1.0, 1.0 );
181181
182182The function accepts the following arguments:
183183
184- - ** alpha** : ` [in] double ` Shape parameter
185- - ** beta** : ` [in] double ` Rate parameter
184+ - ** alpha** : ` [in] double ` Shape parameter.
185+ - ** beta** : ` [in] double ` Rate parameter.
186186
187187``` c
188188double stdlib_base_dists_gamma_entropy ( const double alpha, const double beta );
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ static double benchmark( void ) {
109109
110110 t = tic ();
111111 for ( i = 0 ; i < ITERATIONS ; i ++ ) {
112- y = stdlib_base_dists_gamma_entropy ( alpha [ i % 100 ], beta [ i % 100 ] );
112+ y = stdlib_base_dists_gamma_entropy ( alpha [ i % 100 ], beta [ i % 100 ] );
113113 if ( y != y ) {
114114 printf ( "should not return NaN\n" );
115115 break ;
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ var addon = require( './../src/addon.node' );
2828/**
2929* Returns the differential entropy of a gamma distribution.
3030*
31+ * @private
3132* @param {PositiveNumber } alpha - shape parameter
3233* @param {PositiveNumber } beta - rate parameter
3334* @returns {number } entropy
Original file line number Diff line number Diff line change 2626*
2727* @param alpha Shape parameter
2828* @param beta Rate parameter
29- * @returns Entropy
29+ * @returns differential entropy
3030*
3131* @example
3232* double y = stdlib_base_dists_gamma_entropy( 1.0, 1.0 );
3333* // returns ~1.0
34- *
35- * @example
36- * double y = stdlib_base_dists_gamma_entropy( 4.0, 12.0 );
37- * // returns ~-0.462
38- *
39- * @example
40- * double y = stdlib_base_dists_gamma_entropy( 8.0, 2.0 );
41- * // returns ~1.723
42- *
43- * @example
44- * double y = stdlib_base_dists_gamma_entropy( 1.0, -0.1 );
45- * // returns NaN
46- *
47- * @example
48- * double y = stdlib_base_dists_gamma_entropy( -0.1, 1.0 );
49- * // returns NaN
50- *
51- * @example
52- * double y = stdlib_base_dists_gamma_entropy( 2.0, NaN );
53- * // returns NaN
54- *
55- * @example
56- * double y = stdlib_base_dists_gamma_entropy( NaN, 2.0 );
57- * // returns NaN
5834*/
5935double stdlib_base_dists_gamma_entropy ( const double alpha , const double beta ) {
6036 double out ;
You can’t perform that action at this time.
0 commit comments