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: CHANGELOG.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,25 @@
4
4
5
5
<sectionclass="release"id="unreleased">
6
6
7
-
## Unreleased (2025-03-29)
7
+
## Unreleased (2025-04-25)
8
+
9
+
<sectionclass="features">
10
+
11
+
### Features
12
+
13
+
-[`5d94f92`](https://github.com/stdlib-js/stdlib/commit/5d94f9213500163957b30ea3ad36df4c141a5d41) - add C ndarray interface and refactor implementation for `stats/base/dsempn`[(#6785)](https://github.com/stdlib-js/stdlib/pull/6785)
14
+
15
+
</section>
16
+
17
+
<!-- /.features -->
8
18
9
19
<sectionclass="commits">
10
20
11
21
### Commits
12
22
13
23
<details>
14
24
25
+
-[`5d94f92`](https://github.com/stdlib-js/stdlib/commit/5d94f9213500163957b30ea3ad36df4c141a5d41) - **feat:** add C ndarray interface and refactor implementation for `stats/base/dsempn`[(#6785)](https://github.com/stdlib-js/stdlib/pull/6785)_(by Gururaj Gurram, Athan Reines, stdlib-bot)_
-[`1aa3235`](https://github.com/stdlib-js/stdlib/commit/1aa32350750b13ce35e6cbaf61e48e43dd004548) - **refactor:** update `stats/base/dsempn` native addon from C++ to C [(#4222)](https://github.com/stdlib-js/stdlib/pull/4222)_(by Vivek Maurya)_
@@ -30,10 +41,11 @@
30
41
31
42
### Contributors
32
43
33
-
A total of 4 people contributed to this release. Thank you to the following contributors:
44
+
A total of 5 people contributed to this release. Thank you to the following contributors:
@@ -122,18 +121,16 @@ The function has the following parameters:
122
121
-**N**: number of indexed elements.
123
122
-**correction**: 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 [standard deviation][standard-deviation] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [standard deviation][standard-deviation] 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 corrected sample [standard deviation][standard-deviation], 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).
The `N` and `stride` parameters determine which elements in `x` are accessed at runtime. For example, to compute the [standard error of the mean][standard-error] of every other element in `x`,
126
+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the [standard error of the mean][standard-error] of every other element in `x`,
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
150
146
151
-
varN=floor( x0.length/2 );
152
-
153
-
var v =dsempn( N, 1, x1, 2 );
147
+
var v =dsempn( 4, 1, x1, 2 );
154
148
// returns 1.25
155
149
```
156
150
157
-
#### dsempn.ndarray( N, correction, x, stride, offset )
151
+
#### dsempn.ndarray( N, correction, x, strideX, offsetX )
158
152
159
153
Computes the [standard error of the mean][standard-error] of a double-precision floating-point strided array using a two-pass algorithm and alternative indexing semantics.
The function has the following additional parameters:
172
165
173
-
-**offset**: starting index for `x`.
166
+
-**offsetX**: starting index for `x`.
174
167
175
-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offset` parameter supports indexing semantics based on a starting index. For example, to calculate the [standard error of the mean][standard-error] for every other value in `x` starting from the second value
168
+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to calculate the [standard error of the mean][standard-error] for every other element in `x` starting from the second element
var floor =require( '@stdlib/math-base-special-floor' );
180
172
181
173
var x =newFloat64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
182
-
varN=floor( x.length/2 );
183
174
184
-
var v =dsempn.ndarray( N, 1, x, 2, 1 );
175
+
var v =dsempn.ndarray( 4, 1, x, 2, 1 );
185
176
// returns 1.25
186
177
```
187
178
@@ -229,6 +220,125 @@ console.log( v );
229
220
230
221
<!-- /.examples -->
231
222
223
+
<!-- C interface documentation. -->
224
+
225
+
* * *
226
+
227
+
<sectionclass="c">
228
+
229
+
## C APIs
230
+
231
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
232
+
233
+
<sectionclass="intro">
234
+
235
+
</section>
236
+
237
+
<!-- /.intro -->
238
+
239
+
<!-- C usage documentation. -->
240
+
241
+
<sectionclass="usage">
242
+
243
+
### Usage
244
+
245
+
```c
246
+
#include"stdlib/stats/base/dsempn.h"
247
+
```
248
+
249
+
#### stdlib_strided_dsempn( N, correction, \*X, strideX )
250
+
251
+
Computes the [standard error of the mean][standard-error] of a double-precision floating-point strided array using a two-pass algorithm.
- **N**: `[in] CBLAS_INT` number of indexed elements.
263
+
- **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 [standard deviation][standard-deviation] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [standard deviation][standard-deviation] 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 corrected sample [standard deviation][standard-deviation], 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).
264
+
- **X**: `[in] double*` input array.
265
+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
#### stdlib_strided_dsempn_ndarray( N, correction, \*X, strideX, offsetX )
272
+
273
+
Computes the [standard error of the mean][standard-error] of a double-precision floating-point strided array using a two-pass algorithm and alternative indexing semantics.
double v = stdlib_strided_dsempn_ndarray( 4, 1.0, x, 2, 0 );
279
+
// returns ~1.29099
280
+
```
281
+
282
+
The function accepts the following arguments:
283
+
284
+
- **N**: `[in] CBLAS_INT` number of indexed elements.
285
+
- **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 [standard deviation][standard-deviation] according to `N-c` where `c` corresponds to the provided degrees of freedom adjustment. When computing the [standard deviation][standard-deviation] 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 corrected sample [standard deviation][standard-deviation], 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).
286
+
- **X**: `[in] double*` input array.
287
+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
288
+
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
0 commit comments