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` are accessed at runtime. For example, to compute the maximum absolute value of every other element in `x`,
58
+
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`,
The function has the following additional parameters:
104
100
105
-
-**offset**: starting index for `x`.
101
+
-**offsetX**: starting index for `x`.
106
102
107
-
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
103
+
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 dmaxabs =require( '@stdlib/stats/base/dmaxabs' );
145
138
146
-
var x;
147
-
var i;
148
-
149
-
x =newFloat64Array( 10 );
150
-
for ( i =0; i <x.length; i++ ) {
151
-
x[ i ] =round( (randu()*100.0) -50.0 );
152
-
}
139
+
var x =discreteUniform( 10, -50, 50, {
140
+
'dtype':'float64'
141
+
});
153
142
console.log( x );
154
143
155
144
var v =dmaxabs( x.length, x, 1 );
@@ -160,6 +149,123 @@ console.log( v );
160
149
161
150
<!-- /.examples -->
162
151
152
+
<!-- C interface documentation. -->
153
+
154
+
* * *
155
+
156
+
<sectionclass="c">
157
+
158
+
## C APIs
159
+
160
+
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
161
+
162
+
<sectionclass="intro">
163
+
164
+
</section>
165
+
166
+
<!-- /.intro -->
167
+
168
+
<!-- C usage documentation. -->
169
+
170
+
<sectionclass="usage">
171
+
172
+
### Usage
173
+
174
+
```c
175
+
#include"stdlib/stats/base/dmaxabs.h"
176
+
```
177
+
178
+
#### stdlib_strided_dmaxabs( N, \*X, strideX )
179
+
180
+
Computes the maximum absolute value of a double-precision floating-point strided array.
0 commit comments