File tree Expand file tree Collapse file tree 4 files changed +79
-78
lines changed
lib/node_modules/@stdlib/stats/base/dists/bernoulli/entropy Expand file tree Collapse file tree 4 files changed +79
-78
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ var opts = {
39
39
40
40
// MAIN //
41
41
42
- bench ( pkg , opts , function benchmark ( b ) {
42
+ bench ( pkg + '::native' , opts , function benchmark ( b ) {
43
43
var len ;
44
44
var p ;
45
45
var y ;
Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ int main( void ) {
28
28
for ( i = 0 ; i < 25 ; i ++ ) {
29
29
p = (double )rand () / ( (double )RAND_MAX + 1.0 );
30
30
y = stdlib_base_dists_bernoulli_entropy ( p );
31
- printf ( "x: %lf , H(X;p): %lf\n" , p , y );
31
+ printf ( "x: %lf, H(X;p): %lf\n" , p , y );
32
32
}
33
33
}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ var addon = require( './../src/addon.node' );
28
28
/**
29
29
* Returns the entropy of a Bernoulli distribution.
30
30
*
31
+ * @private
31
32
* @param {Probability } p - success probability
32
33
* @returns {PositiveNumber } entropy
33
34
*
Original file line number Diff line number Diff line change 1
1
{
2
- "options" : {
2
+ "options" : {
3
+ "task" : " build" ,
4
+ "wasm" : false
5
+ },
6
+ "fields" : [
7
+ {
8
+ "field" : " src" ,
9
+ "resolve" : true ,
10
+ "relative" : true
11
+ },
12
+ {
13
+ "field" : " include" ,
14
+ "resolve" : true ,
15
+ "relative" : true
16
+ },
17
+ {
18
+ "field" : " libraries" ,
19
+ "resolve" : false ,
20
+ "relative" : false
21
+ },
22
+ {
23
+ "field" : " libpath" ,
24
+ "resolve" : true ,
25
+ "relative" : false
26
+ }
27
+ ],
28
+ "confs" : [
29
+ {
3
30
"task" : " build" ,
4
- "wasm" : false
31
+ "wasm" : false ,
32
+ "src" : [
33
+ " ./src/main.c"
34
+ ],
35
+ "include" : [
36
+ " ./include"
37
+ ],
38
+ "libraries" : [],
39
+ "libpath" : [],
40
+ "dependencies" : [
41
+ " @stdlib/math/base/napi/unary" ,
42
+ " @stdlib/math/base/assert/is-nan" ,
43
+ " @stdlib/math/base/special/ln"
44
+ ]
45
+ },
46
+ {
47
+ "task" : " benchmark" ,
48
+ "wasm" : false ,
49
+ "src" : [
50
+ " ./src/main.c"
51
+ ],
52
+ "include" : [
53
+ " ./include"
54
+ ],
55
+ "libraries" : [],
56
+ "libpath" : [],
57
+ "dependencies" : [
58
+ " @stdlib/math/base/assert/is-nan" ,
59
+ " @stdlib/math/base/special/ln"
60
+ ]
5
61
},
6
- "fields" : [
7
- {
8
- "field" : " src" ,
9
- "resolve" : true ,
10
- "relative" : true
11
- },
12
- {
13
- "field" : " include" ,
14
- "resolve" : true ,
15
- "relative" : true
16
- },
17
- {
18
- "field" : " libraries" ,
19
- "resolve" : false ,
20
- "relative" : false
21
- },
22
- {
23
- "field" : " libpath" ,
24
- "resolve" : true ,
25
- "relative" : false
26
- }
27
- ],
28
- "confs" : [
29
- {
30
- "task" : " build" ,
31
- "wasm" : false ,
32
- "src" : [
33
- " ./src/main.c"
34
- ],
35
- "include" : [
36
- " ./include"
37
- ],
38
- "libraries" : [],
39
- "libpath" : [],
40
- "dependencies" : [
41
- " @stdlib/math/base/napi/unary" ,
42
- " @stdlib/math/base/assert/is-nan" ,
43
- " @stdlib/math/base/special/ln"
44
- ]
45
- },
46
- {
47
- "task" : " benchmark" ,
48
- "wasm" : false ,
49
- "src" : [
50
- " ./src/main.c"
51
- ],
52
- "include" : [
53
- " ./include"
54
- ],
55
- "libraries" : [],
56
- "libpath" : [],
57
- "dependencies" : [
58
- " @stdlib/math/base/assert/is-nan" ,
59
- " @stdlib/math/base/special/ln"
60
- ]
61
- },
62
- {
63
- "task" : " examples" ,
64
- "wasm" : false ,
65
- "src" : [
66
- " ./src/main.c"
67
- ],
68
- "include" : [
69
- " ./include"
70
- ],
71
- "libraries" : [],
72
- "libpath" : [],
73
- "dependencies" : [
74
- " @stdlib/math/base/assert/is-nan" ,
75
- " @stdlib/math/base/special/ln"
76
- ]
77
- }
78
- ]
79
- }
62
+ {
63
+ "task" : " examples" ,
64
+ "wasm" : false ,
65
+ "src" : [
66
+ " ./src/main.c"
67
+ ],
68
+ "include" : [
69
+ " ./include"
70
+ ],
71
+ "libraries" : [],
72
+ "libpath" : [],
73
+ "dependencies" : [
74
+ " @stdlib/math/base/assert/is-nan" ,
75
+ " @stdlib/math/base/special/ln"
76
+ ]
77
+ }
78
+ ]
79
+ }
You can’t perform that action at this time.
0 commit comments