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
The `N` and `stride` parameters determine which elements in `x` and `y` are accessed at runtime. For example, to compute the cumulative minimum of every other element in `x`,
61
+
The `N` and stride parameters determine which elements in the strided arrays are accessed at runtime. For example, to compute the cumulative minimum of every other element in `x`,
@@ -108,7 +108,7 @@ The function has the following additional parameters:
108
108
-**offsetX**: starting index for `x`.
109
109
-**offsetY**: starting index for `y`.
110
110
111
-
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 minimum 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
111
+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, offset parameters support indexing semantics based on a starting indices. For example, to calculate the cumulative minimum of every other element in `x` starting from the second element and to store in the last `N` elements of `y` starting from the last element
var scumin =require( '@stdlib/stats/base/scumin' );
148
147
149
-
var y;
150
-
var x;
151
-
var i;
152
-
153
-
x =newFloat32Array( 10 );
154
-
y =newFloat32Array( x.length );
155
-
for ( i =0; i <x.length; i++ ) {
156
-
x[ i ] =round( randu()*100.0 );
157
-
}
148
+
var x =discreteUniform( 10, -50, 50, {
149
+
'dtype':'float32'
150
+
});
151
+
var y =newFloat32Array( x.length );
158
152
console.log( x );
159
153
console.log( y );
160
154
@@ -166,6 +160,132 @@ console.log( y );
166
160
167
161
<!-- /.examples -->
168
162
163
+
<!-- C interface documentation. -->
164
+
165
+
* * *
166
+
167
+
<sectionclass="c">
168
+
169
+
## C APIs
170
+
171
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
172
+
173
+
<sectionclass="intro">
174
+
175
+
</section>
176
+
177
+
<!-- /.intro -->
178
+
179
+
<!-- C usage documentation. -->
180
+
181
+
<sectionclass="usage">
182
+
183
+
### Usage
184
+
185
+
```c
186
+
#include"stdlib/stats/base/scumin.h"
187
+
```
188
+
189
+
#### stdlib_strided_scumin( N, \*X, strideX, \*Y, strideY )
190
+
191
+
Computes the cumulative minimum of single-precision floating-point strided array elements.
0 commit comments