You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/node_modules/@stdlib/stats/strided/dvarmtk/README.md
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ The use of the term `n-1` is commonly referred to as Bessel's correction. Note,
98
98
var dvarmtk =require( '@stdlib/stats/strided/dvarmtk' );
99
99
```
100
100
101
-
#### dvarmtk( N, mean, correction, x, strideX )
101
+
#### dvarmtk( N, correction, mean, x, strideX )
102
102
103
103
Computes the [variance][variance] of a double-precision floating-point strided array `x` provided a known `mean` and using a one-pass textbook algorithm.
104
104
@@ -107,7 +107,7 @@ var Float64Array = require( '@stdlib/array/float64' );
107
107
108
108
var x =newFloat64Array( [ 1.0, -2.0, 2.0 ] );
109
109
110
-
var v =dvarmtk( x.length, 1.0/3.0, 1, x, 1 );
110
+
var v =dvarmtk( x.length, 1, 1.0/3.0, x, 1 );
111
111
// returns ~4.3333
112
112
```
113
113
@@ -126,7 +126,7 @@ var Float64Array = require( '@stdlib/array/float64' );
126
126
127
127
var x =newFloat64Array( [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ] );
128
128
129
-
var v =dvarmtk( 4, 1.25, 1, x, 2 );
129
+
var v =dvarmtk( 4, 1, 1.25, x, 2 );
130
130
// returns 6.25
131
131
```
132
132
@@ -140,7 +140,7 @@ var Float64Array = require( '@stdlib/array/float64' );
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
142
142
143
-
var v =dvarmtk( 4, 1.25, 1, x1, 2 );
143
+
var v =dvarmtk( 4, 1, 1.25, x1, 2 );
144
144
// returns 6.25
145
145
```
146
146
@@ -153,7 +153,7 @@ var Float64Array = require( '@stdlib/array/float64' );
153
153
154
154
var x =newFloat64Array( [ 1.0, -2.0, 2.0 ] );
155
155
156
-
var v =dvarmtk.ndarray( x.length, 1.0/3.0, 1, x, 1, 0 );
156
+
var v =dvarmtk.ndarray( x.length, 1, 1.0/3.0, x, 1, 0 );
157
157
// returns ~4.33333
158
158
```
159
159
@@ -168,7 +168,7 @@ var Float64Array = require( '@stdlib/array/float64' );
168
168
169
169
var x =newFloat64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
170
170
171
-
var v =dvarmtk.ndarray( 4, 1.25, 1, x, 2, 1 );
171
+
var v =dvarmtk.ndarray( 4, 1, 1.25, x, 2, 1 );
172
172
// returns 6.25
173
173
```
174
174
@@ -202,7 +202,7 @@ var x = discreteUniform( 10, -50, 50, {
202
202
});
203
203
console.log( x );
204
204
205
-
var v =dvarmtk( x.length, 0.0, 1, x, 1 );
205
+
var v =dvarmtk( x.length, 1, 0.0, x, 1 );
206
206
console.log( v );
207
207
```
208
208
@@ -236,51 +236,51 @@ console.log( v );
236
236
#include"stdlib/stats/strided/dvarmtk.h"
237
237
```
238
238
239
-
#### stdlib_strided_dvarmtk( N, mean, correction, \*X, strideX )
239
+
#### stdlib_strided_dvarmtk( N, correction, mean, \*X, strideX )
240
240
241
241
Computes the [variance][variance] of a double-precision floating-point strided array provided a known `mean` and using a one-pass textbook algorithm.
242
242
243
243
```c
244
244
constdouble x[] = { 1.0, -2.0, 2.0 };
245
245
246
-
double v = stdlib_strided_dvarmtk( 3, 1.0/3.0, 1.0, x, 1 );
246
+
double v = stdlib_strided_dvarmtk( 3, 1.0, 1.0/3.0, x, 1 );
247
247
// returns ~4.3333
248
248
```
249
249
250
250
The function accepts the following arguments:
251
251
252
252
- **N**: `[in] CBLAS_INT` number of indexed elements.
253
-
- **mean**: `[in] double` mean.
254
253
- **correction**: `[in] double` degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
254
+
- **mean**: `[in] double` mean.
255
255
- **X**: `[in] double*` input array.
256
256
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
#### stdlib_strided_dvarmtk_ndarray( N, mean, correction, \*X, strideX, offsetX )
262
+
#### stdlib_strided_dvarmtk_ndarray( N, correction, mean, \*X, strideX, offsetX )
263
263
264
264
Computes the [variance][variance] of a double-precision floating-point strided array provided a known `mean` and using a one-pass textbook algorithm and alternative indexing semantics.
- **N**: `[in] CBLAS_INT` number of indexed elements.
276
-
- **mean**: `[in] double` mean.
277
276
- **correction**: `[in] double` degrees of freedom adjustment. Setting this parameter to a value other than `0` has the effect of adjusting the divisor during the calculation of the [variance][variance] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [variance][variance] of a population, setting this parameter to `0` is the standard choice (i.e., the provided array contains data constituting an entire population). When computing the unbiased sample [variance][variance], setting this parameter to `1` is the standard choice (i.e., the provided array contains data sampled from a larger population; this is commonly referred to as Bessel's correction).
277
+
- **mean**: `[in] double` mean.
278
278
- **X**: `[in] double*` input array.
279
279
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
280
280
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
* Computes the variance of a double-precision floating-point strided array provided a known mean and using a one-pass textbook algorithm and alternative indexing semantics.
47
47
*
48
48
* @param N - number of indexed elements
49
-
* @param mean - mean
50
49
* @param correction - degrees of freedom adjustment
50
+
* @param mean - mean
51
51
* @param x - input array
52
52
* @param strideX - stride length
53
53
* @param offsetX - starting index
@@ -58,18 +58,18 @@ interface Routine {
58
58
*
59
59
* var x = new Float64Array( [ 1.0, -2.0, 2.0 ] );
60
60
*
61
-
* var v = dvarmtk.ndarray( x.length, 1.0/3.0, 1, x, 1, 0 );
61
+
* var v = dvarmtk.ndarray( x.length, 1, 1.0/3.0, x, 1, 0 );
0 commit comments