@stdlib/stats-base-cumax 0.0.3 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2021 The Stdlib Authors.
1
+ Copyright (c) 2016-2022 The Stdlib Authors.
package/README.md CHANGED
@@ -20,7 +20,7 @@ limitations under the License.
20
20
 
21
21
  # cumax
22
22
 
23
- [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] [![dependencies][dependencies-image]][dependencies-url]
23
+ [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
24
24
 
25
25
  > Calculate the cumulative maximum of a strided array.
26
26
 
@@ -71,14 +71,10 @@ The function has the following parameters:
71
71
  The `N` and `stride` parameters determine which elements in `x` and `y` are accessed at runtime. For example, to compute the cumulative maximum of every other element in `x`,
72
72
 
73
73
  ```javascript
74
- var floor = require( '@stdlib/math-base-special-floor' );
75
-
76
74
  var x = [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ];
77
75
  var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];
78
76
 
79
- var N = floor( x.length / 2 );
80
-
81
- var v = cumax( N, x, 2, y, 1 );
77
+ var v = cumax( 4, x, 2, y, 1 );
82
78
  // y => [ 1.0, 2.0, 2.0, 4.0, 0.0, 0.0, 0.0, 0.0 ]
83
79
  ```
84
80
 
@@ -88,7 +84,6 @@ Note that indexing is relative to the first index. To introduce an offset, use [
88
84
 
89
85
  ```javascript
90
86
  var Float64Array = require( '@stdlib/array-float64' );
91
- var floor = require( '@stdlib/math-base-special-floor' );
92
87
 
93
88
  // Initial arrays...
94
89
  var x0 = new Float64Array( [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ] );
@@ -98,10 +93,8 @@ var y0 = new Float64Array( x0.length );
98
93
  var x1 = new Float64Array( x0.buffer, x0.BYTES_PER_ELEMENT*1 ); // start at 2nd element
99
94
  var y1 = new Float64Array( y0.buffer, y0.BYTES_PER_ELEMENT*3 ); // start at 4th element
100
95
 
101
- var N = floor( x0.length / 2 );
102
-
103
- cumax( N, x1, -2, y1, 1 );
104
- // y0 => <Float64Array>[ 0.0, 0.0, 0.0, 0.0, 4.0, 4.0, 4.0, 4.0 ]
96
+ cumax( 4, x1, -2, y1, 1 );
97
+ // y0 => <Float64Array>[ 0.0, 0.0, 0.0, 4.0, 4.0, 4.0, 4.0, 0.0 ]
105
98
  ```
106
99
 
107
100
  #### cumax.ndarray( N, x, strideX, offsetX, y, strideY, offsetY )
@@ -124,14 +117,10 @@ The function has the following additional parameters:
124
117
  While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, `offsetX` and `offsetY` parameters support indexing semantics based on a starting indices. For example, to calculate the cumulative maximum of every other value in `x` starting from the second value and to store in the last `N` elements of `y` starting from the last element
125
118
 
126
119
  ```javascript
127
- var floor = require( '@stdlib/math-base-special-floor' );
128
-
129
120
  var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];
130
121
  var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];
131
122
 
132
- var N = floor( x.length / 2 );
133
-
134
- cumax.ndarray( N, x, 2, 1, y, -1, y.length-1 );
123
+ cumax.ndarray( 4, x, 2, 1, y, -1, y.length-1 );
135
124
  // y => [ 0.0, 0.0, 0.0, 0.0, 4.0, 2.0, 1.0, 1.0 ]
136
125
  ```
137
126
 
@@ -188,6 +177,24 @@ console.log( y );
188
177
 
189
178
  <!-- /.references -->
190
179
 
180
+ <!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
181
+
182
+ <section class="related">
183
+
184
+ * * *
185
+
186
+ ## See Also
187
+
188
+ - <span class="package-name">[`@stdlib/stats/base/cumin`][@stdlib/stats/base/cumin]</span><span class="delimiter">: </span><span class="description">calculate the cumulative minimum of a strided array.</span>
189
+ - <span class="package-name">[`@stdlib/stats/base/dcumax`][@stdlib/stats/base/dcumax]</span><span class="delimiter">: </span><span class="description">calculate the cumulative maximum of double-precision floating-point strided array elements.</span>
190
+ - <span class="package-name">[`@stdlib/stats/base/scumax`][@stdlib/stats/base/scumax]</span><span class="delimiter">: </span><span class="description">calculate the cumulative maximum of single-precision floating-point strided array elements.</span>
191
+
192
+ </section>
193
+
194
+ <!-- /.related -->
195
+
196
+ <!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
197
+
191
198
 
192
199
  <section class="main-repo" >
193
200
 
@@ -199,6 +206,10 @@ This package is part of [stdlib][stdlib], a standard library for JavaScript and
199
206
 
200
207
  For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib].
201
208
 
209
+ #### Community
210
+
211
+ [![Chat][chat-image]][chat-url]
212
+
202
213
  ---
203
214
 
204
215
  ## License
@@ -208,7 +219,7 @@ See [LICENSE][stdlib-license].
208
219
 
209
220
  ## Copyright
210
221
 
211
- Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
222
+ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
212
223
 
213
224
  </section>
214
225
 
@@ -227,9 +238,23 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
227
238
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/stats-base-cumax/main.svg
228
239
  [coverage-url]: https://codecov.io/github/stdlib-js/stats-base-cumax?branch=main
229
240
 
230
- [dependencies-image]: https://img.shields.io/david/stdlib-js/stats-base-cumax
241
+ <!--
242
+
243
+ [dependencies-image]: https://img.shields.io/david/stdlib-js/stats-base-cumax.svg
231
244
  [dependencies-url]: https://david-dm.org/stdlib-js/stats-base-cumax/main
232
245
 
246
+ -->
247
+
248
+ [umd]: https://github.com/umdjs/umd
249
+ [es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules
250
+
251
+ [deno-url]: https://github.com/stdlib-js/stats-base-cumax/tree/deno
252
+ [umd-url]: https://github.com/stdlib-js/stats-base-cumax/tree/umd
253
+ [esm-url]: https://github.com/stdlib-js/stats-base-cumax/tree/esm
254
+
255
+ [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
256
+ [chat-url]: https://gitter.im/stdlib-js/stdlib/
257
+
233
258
  [stdlib]: https://github.com/stdlib-js/stdlib
234
259
 
235
260
  [stdlib-authors]: https://github.com/stdlib-js/stdlib/graphs/contributors
@@ -240,9 +265,15 @@ Copyright &copy; 2016-2021. The Stdlib [Authors][stdlib-authors].
240
265
 
241
266
  [mdn-typed-array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
242
267
 
243
- [@stdlib/stats/base/dcumax]: https://github.com/stdlib-js/stats-base-dcumax
268
+ <!-- <related-links> -->
269
+
270
+ [@stdlib/stats/base/cumin]: https://www.npmjs.com/package/@stdlib/stats-base-cumin
271
+
272
+ [@stdlib/stats/base/dcumax]: https://www.npmjs.com/package/@stdlib/stats-base-dcumax
273
+
274
+ [@stdlib/stats/base/scumax]: https://www.npmjs.com/package/@stdlib/stats-base-scumax
244
275
 
245
- [@stdlib/stats/base/scumax]: https://github.com/stdlib-js/stats-base-scumax
276
+ <!-- </related-links> -->
246
277
 
247
278
  </section>
248
279
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/stats-base-cumax",
3
- "version": "0.0.3",
3
+ "version": "0.0.7",
4
4
  "description": "Calculate the cumulative maximum of a strided array.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -28,7 +28,7 @@
28
28
  "examples": "make examples",
29
29
  "benchmark": "make benchmark"
30
30
  },
31
- "homepage": "https://github.com/stdlib-js/stdlib",
31
+ "homepage": "https://stdlib.io",
32
32
  "repository": {
33
33
  "type": "git",
34
34
  "url": "git://github.com/stdlib-js/stats-base-cumax.git"
package/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- # CHANGELOG
2
-
3
- > Package changelog.
4
-
5
- See [GitHub Releases](https://github.com/stdlib-js/stats-base-cumax/releases) for the changelog.