File tree Expand file tree Collapse file tree 2 files changed +24
-12
lines changed
lib/node_modules/@stdlib/stats/base/nanmin-by/benchmark Expand file tree Collapse file tree 2 files changed +24
-12
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license Apache-2.0
3
3
*
4
- * Copyright (c) 2025 The Stdlib Authors.
4
+ * Copyright (c) 2020 The Stdlib Authors.
5
5
*
6
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
7
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ var bernoulli = require( '@stdlib/random/base/bernoulli' );
27
27
var isnan = require ( '@stdlib/math/base/assert/is-nan' ) ;
28
28
var pow = require ( '@stdlib/math/base/special/pow' ) ;
29
29
var pkg = require ( './../package.json' ) . name ;
30
- var nanminBy = require ( './../lib/nanmin_by .js' ) ;
30
+ var nanminBy = require ( './../lib/main .js' ) ;
31
31
32
32
33
33
// FUNCTIONS //
@@ -39,17 +39,23 @@ var nanminBy = require( './../lib/nanmin_by.js' );
39
39
* @param {number } value - array element
40
40
* @returns {number } accessed value
41
41
*/
42
+ function accessor ( value ) {
43
+ return value * 2.0 ;
44
+ }
45
+
46
+ /**
47
+ * Returns a random number.
48
+ *
49
+ * @private
50
+ * @returns {number } random number
51
+ */
42
52
function rand ( ) {
43
- if ( bernoulli ( 0.8 ) < 1 ) {
53
+ if ( bernoulli ( 0.8 ) < 1 ) {
44
54
return NaN ;
45
55
}
46
56
return uniform ( - 50.0 , 50.0 ) ;
47
57
}
48
58
49
- function accessor ( value ) {
50
- return value * 2.0 ;
51
- }
52
-
53
59
/**
54
60
* Create a benchmark function.
55
61
*
Original file line number Diff line number Diff line change @@ -39,17 +39,23 @@ var nanminBy = require( './../lib/ndarray.js' );
39
39
* @param {number } value - array element
40
40
* @returns {number } accessed value
41
41
*/
42
+ function accessor ( value ) {
43
+ return value * 2.0 ;
44
+ }
45
+
46
+ /**
47
+ * Returns a random number.
48
+ *
49
+ * @private
50
+ * @returns {number } random number
51
+ */
42
52
function rand ( ) {
43
- if ( bernoulli ( 0.8 ) < 1 ) {
53
+ if ( bernoulli ( 0.8 ) < 1 ) {
44
54
return NaN ;
45
55
}
46
56
return uniform ( - 50.0 , 50.0 ) ;
47
57
}
48
58
49
- function accessor ( value ) {
50
- return value * 2.0 ;
51
- }
52
-
53
59
/**
54
60
* Create a benchmark function.
55
61
*
You can’t perform that action at this time.
0 commit comments