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/blas/ext/base/gcusumkbn/README.md
+12-28
Original file line number
Diff line number
Diff line change
@@ -59,21 +59,17 @@ The function has the following parameters:
59
59
-**N**: number of indexed elements.
60
60
-**sum**: initial sum.
61
61
-**x**: input [`Array`][mdn-array] or [`typed array`][mdn-typed-array].
62
-
-**strideX**: index increment for `x`.
62
+
-**strideX**: stride length for `x`.
63
63
-**y**: output [`Array`][mdn-array] or [`typed array`][mdn-typed-array].
64
-
-**strideY**: index increment for `y`.
64
+
-**strideY**: stride length for `y`.
65
65
66
-
The `N` and `stride` parameters determine which elements in `x` and `y` are accessed at runtime. For example, to compute the cumulative sum of every other element in `x`,
66
+
The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to compute the cumulative sum of every other element:
67
67
68
68
```javascript
69
-
var floor =require( '@stdlib/math/base/special/floor' );
70
-
71
69
var x = [ 1.0, 2.0, 2.0, -7.0, -2.0, 3.0, 4.0, 2.0 ];
72
70
var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];
@@ -116,17 +109,13 @@ The function has the following additional parameters:
116
109
-**offsetX**: starting index for `x`.
117
110
-**offsetY**: starting index for `y`.
118
111
119
-
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 sum 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
112
+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, offset parameters support indexing semantics based on starting indices. For example, to calculate the cumulative sum of every other element in the strided input array starting from the second element and to store in the last `N` elements of the strided output array starting from the last element:
120
113
121
114
```javascript
122
-
var floor =require( '@stdlib/math/base/special/floor' );
123
-
124
115
var x = [ 2.0, 1.0, 2.0, -2.0, -2.0, 2.0, 3.0, 4.0 ];
125
116
var y = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];
126
117
127
-
varN=floor( x.length/2 );
128
-
129
-
gcusumkbn.ndarray( N, 0.0, x, 2, 1, y, -1, y.length-1 );
118
+
gcusumkbn.ndarray( 4, 0.0, x, 2, 1, y, -1, y.length-1 );
0 commit comments