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
+12-1Lines changed: 12 additions & 1 deletion
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 (2024-12-23)
7
+
## Unreleased (2025-01-02)
8
+
9
+
<sectionclass="features">
10
+
11
+
### Features
12
+
13
+
-[`6b59072`](https://github.com/stdlib-js/stdlib/commit/6b5907250180eee4ea3c90a855e1aebbefdc2d2b) - add C ndarray interface and refactor implementation for `stats/base/dmaxabssorted`[(#4181)](https://github.com/stdlib-js/stdlib/pull/4181)
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
+
-[`6b59072`](https://github.com/stdlib-js/stdlib/commit/6b5907250180eee4ea3c90a855e1aebbefdc2d2b) - **feat:** add C ndarray interface and refactor implementation for `stats/base/dmaxabssorted`[(#4181)](https://github.com/stdlib-js/stdlib/pull/4181)_(by Aayush Khanna, stdlib-bot)_
15
26
-[`62364f6`](https://github.com/stdlib-js/stdlib/commit/62364f62ea823a3b52c2ad25660ecd80c71f8f36) - **style:** fix C comment alignment _(by Philipp Burckhardt)_
16
27
-[`e20fc92`](https://github.com/stdlib-js/stdlib/commit/e20fc92ffce656a95a804b2b72d822aad4e7b227) - **refactor:** update `stats/base/dmaxabssorted` native addon from C++ to C [(#4080)](https://github.com/stdlib-js/stdlib/pull/4080)_(by Aayush Khanna)_
17
28
-[`9e689ff`](https://github.com/stdlib-js/stdlib/commit/9e689ffcb7c6223afc521f1e574b42f10921cf5e) - **chore:** fix indentation in manifest.json files _(by Philipp Burckhardt)_
The `N` and `stride` parameters determine which elements in `x` are accessed at runtime. For example, to compute the maximum absolute value of every other element in `x`,
94
+
The `N` and stride parameters determine which elements in the strided array are accessed at runtime. For example, to compute the maximum absolute value of every other element in `x`,
var x1 =newFloat64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
117
114
118
-
varN=floor( x0.length/2 );
119
-
120
-
var v =dmaxabssorted( N, x1, 2 );
115
+
var v =dmaxabssorted( 4, x1, 2 );
121
116
// returns 4.0
122
117
```
123
118
124
-
#### dmaxabssorted.ndarray( N, x, stride, offset )
119
+
#### dmaxabssorted.ndarray( N, x, strideX, offsetX )
125
120
126
121
Computes the maximum absolute value of a sorted double-precision floating-point strided array using alternative indexing semantics.
127
122
@@ -135,18 +130,16 @@ var v = dmaxabssorted.ndarray( x.length, x, 1, 0 );
135
130
136
131
The function has the following additional parameters:
137
132
138
-
-**offset**: starting index for `x`.
133
+
-**offsetX**: starting index for `x`.
139
134
140
-
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 maximum absolute value for every other value in `x` starting from the second value
135
+
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 maximum absolute value for every other element in `x` starting from the second element
var dmaxabssorted =require( '@stdlib/stats-base-dmaxabssorted' );
177
170
178
-
var x;
179
-
var i;
180
-
181
-
x =newFloat64Array( 10 );
182
-
for ( i =0; i <x.length; i++ ) {
183
-
x[ i ] = i -5.0;
184
-
}
171
+
var options = {
172
+
'dtype':'float64'
173
+
};
174
+
var x =linspace( -5.0, 5.0, 10, options );
185
175
console.log( x );
186
176
187
177
var v =dmaxabssorted( x.length, x, 1 );
@@ -192,6 +182,123 @@ console.log( v );
192
182
193
183
<!-- /.examples -->
194
184
185
+
<!-- C interface documentation. -->
186
+
187
+
* * *
188
+
189
+
<sectionclass="c">
190
+
191
+
## C APIs
192
+
193
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
194
+
195
+
<sectionclass="intro">
196
+
197
+
</section>
198
+
199
+
<!-- /.intro -->
200
+
201
+
<!-- C usage documentation. -->
202
+
203
+
<sectionclass="usage">
204
+
205
+
### Usage
206
+
207
+
```c
208
+
#include"stdlib/stats/base/dmaxabssorted.h"
209
+
```
210
+
211
+
#### stdlib_strided_dmaxabssorted( N, \*X, strideX )
212
+
213
+
Computes the maximum absolute value of a sorted double-precision floating-point strided array.
0 commit comments