@stdlib/blas-ext-base-srev 0.0.11 → 0.1.0

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/CITATION.cff ADDED
@@ -0,0 +1,30 @@
1
+ cff-version: 1.2.0
2
+ title: stdlib
3
+ message: >-
4
+ If you use this software, please cite it using the
5
+ metadata from this file.
6
+
7
+ type: software
8
+
9
+ authors:
10
+ - name: The Stdlib Authors
11
+ url: https://github.com/stdlib-js/stdlib/graphs/contributors
12
+
13
+ repository-code: https://github.com/stdlib-js/stdlib
14
+ url: https://stdlib.io
15
+
16
+ abstract: |
17
+ Standard library for JavaScript and Node.js.
18
+
19
+ keywords:
20
+ - JavaScript
21
+ - Node.js
22
+ - TypeScript
23
+ - standard library
24
+ - scientific computing
25
+ - numerical computing
26
+ - statistical computing
27
+
28
+ license: Apache-2.0 AND BSL-1.0
29
+
30
+ date-released: 2016
package/NOTICE CHANGED
@@ -1 +1 @@
1
- Copyright (c) 2016-2022 The Stdlib Authors.
1
+ Copyright (c) 2016-2023 The Stdlib Authors.
package/README.md CHANGED
@@ -18,6 +18,17 @@ limitations under the License.
18
18
 
19
19
  -->
20
20
 
21
+
22
+ <details>
23
+ <summary>
24
+ About stdlib...
25
+ </summary>
26
+ <p>We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.</p>
27
+ <p>The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.</p>
28
+ <p>When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.</p>
29
+ <p>To join us in bringing numerical computing to the web, get started by checking us out on <a href="https://github.com/stdlib-js/stdlib">GitHub</a>, and please consider <a href="https://opencollective.com/stdlib">financially supporting stdlib</a>. We greatly appreciate your continued support!</p>
30
+ </details>
31
+
21
32
  # srev
22
33
 
23
34
  [![NPM version][npm-image]][npm-url] [![Build Status][test-image]][test-url] [![Coverage Status][coverage-image]][coverage-url] <!-- [![dependencies][dependencies-image]][dependencies-url] -->
@@ -181,8 +192,8 @@ console.log( x );
181
192
 
182
193
  ## See Also
183
194
 
184
- - <span class="package-name">[`@stdlib/blas/ext/base/drev`][@stdlib/blas/ext/base/drev]</span><span class="delimiter">: </span><span class="description">reverse a double-precision floating-point strided array in-place.</span>
185
- - <span class="package-name">[`@stdlib/blas/ext/base/grev`][@stdlib/blas/ext/base/grev]</span><span class="delimiter">: </span><span class="description">reverse a strided array in-place.</span>
195
+ - <span class="package-name">[`@stdlib/blas-ext/base/drev`][@stdlib/blas/ext/base/drev]</span><span class="delimiter">: </span><span class="description">reverse a double-precision floating-point strided array in-place.</span>
196
+ - <span class="package-name">[`@stdlib/blas-ext/base/grev`][@stdlib/blas/ext/base/grev]</span><span class="delimiter">: </span><span class="description">reverse a strided array in-place.</span>
186
197
 
187
198
  </section>
188
199
 
@@ -214,7 +225,7 @@ See [LICENSE][stdlib-license].
214
225
 
215
226
  ## Copyright
216
227
 
217
- Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
228
+ Copyright &copy; 2016-2023. The Stdlib [Authors][stdlib-authors].
218
229
 
219
230
  </section>
220
231
 
@@ -227,8 +238,8 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
227
238
  [npm-image]: http://img.shields.io/npm/v/@stdlib/blas-ext-base-srev.svg
228
239
  [npm-url]: https://npmjs.org/package/@stdlib/blas-ext-base-srev
229
240
 
230
- [test-image]: https://github.com/stdlib-js/blas-ext-base-srev/actions/workflows/test.yml/badge.svg?branch=v0.0.11
231
- [test-url]: https://github.com/stdlib-js/blas-ext-base-srev/actions/workflows/test.yml?query=branch:v0.0.11
241
+ [test-image]: https://github.com/stdlib-js/blas-ext-base-srev/actions/workflows/test.yml/badge.svg?branch=v0.1.0
242
+ [test-url]: https://github.com/stdlib-js/blas-ext-base-srev/actions/workflows/test.yml?query=branch:v0.1.0
232
243
 
233
244
  [coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/blas-ext-base-srev/main.svg
234
245
  [coverage-url]: https://codecov.io/github/stdlib-js/blas-ext-base-srev?branch=main
@@ -241,7 +252,7 @@ Copyright &copy; 2016-2022. The Stdlib [Authors][stdlib-authors].
241
252
  -->
242
253
 
243
254
  [chat-image]: https://img.shields.io/gitter/room/stdlib-js/stdlib.svg
244
- [chat-url]: https://gitter.im/stdlib-js/stdlib/
255
+ [chat-url]: https://app.gitter.im/#/room/#stdlib-js_stdlib:gitter.im
245
256
 
246
257
  [stdlib]: https://github.com/stdlib-js/stdlib
247
258
 
@@ -0,0 +1,3 @@
1
+ /// <reference path="../docs/types/index.d.ts" />
2
+ import srev from '../docs/types/index';
3
+ export = srev;
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";var m=function(u,r){return function(){return r||u((r={exports:{}}).exports,r),r.exports}};var y=m(function(F,c){
2
+ var O=require('@stdlib/math-base-special-floor/dist'),q=3;function b(u,r,i){var n,a,e,v,f,o;if(u<=0)return r;if(f=O(u/2),i===1){if(v=f%q,e=u-1,v>0)for(a=0;a<v;a++)n=r[a],r[a]=r[e],r[e]=n,e-=1;if(f<q)return r;for(a=v;a<f;a+=q)n=r[a],r[a]=r[e],r[e]=n,n=r[a+1],r[a+1]=r[e-1],r[e-1]=n,n=r[a+2],r[a+2]=r[e-2],r[e-2]=n,e-=q;return r}for(i<0?a=(1-u)*i:a=0,e=a+(u-1)*i,o=0;o<f;o++)n=r[a],r[a]=r[e],r[e]=n,a+=i,e-=i;return r}c.exports=b
3
+ });var j=m(function(G,l){
4
+ var g=require('@stdlib/math-base-special-floor/dist'),s=3;function h(u,r,i,n){var a,e,v,f,o,t;if(u<=0)return r;if(o=g(u/2),e=n,i===1){if(f=o%s,v=e+u-1,f>0)for(t=0;t<f;t++)a=r[e],r[e]=r[v],r[v]=a,e+=i,v-=i;if(o<s)return r;for(t=f;t<o;t+=s)a=r[e],r[e]=r[v],r[v]=a,a=r[e+1],r[e+1]=r[v-1],r[v-1]=a,a=r[e+2],r[e+2]=r[v-2],r[v-2]=a,e+=s,v-=s;return r}for(v=e+(u-1)*i,t=0;t<o;t++)a=r[e],r[e]=r[v],r[v]=a,e+=i,v-=i;return r}l.exports=h
5
+ });var _=m(function(H,R){
6
+ var k=require('@stdlib/utils-define-nonenumerable-read-only-property/dist'),M=y(),w=j();k(M,"ndarray",w);R.exports=M
7
+ });var z=require("path").join,A=require('@stdlib/utils-try-require/dist'),B=require('@stdlib/assert-is-error/dist'),C=_(),p,E=A(z(__dirname,"./native.js"));B(E)?p=C:p=E;module.exports=p;
8
+ /** @license Apache-2.0 */
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../lib/srev.js", "../lib/ndarray.js", "../lib/main.js", "../lib/index.js"],
4
+ "sourcesContent": ["/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar floor = require( '@stdlib/math-base-special-floor' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Reverses a single-precision floating-point strided array in-place.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* srev( x.length, x, 1 );\n* // x => <Float32Array>[ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*/\nfunction srev( N, x, stride ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tn = floor( N/2 );\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = n % M;\n\t\tiy = N - 1;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( ix = 0; ix < m; ix++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = x[ iy ];\n\t\t\t\tx[ iy ] = tmp;\n\t\t\t\tiy -= 1;\n\t\t\t}\n\t\t}\n\t\tif ( n < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( ix = m; ix < n; ix += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = x[ iy ];\n\t\t\tx[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = x[ iy-1 ];\n\t\t\tx[ iy-1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = x[ iy-2 ];\n\t\t\tx[ iy-2 ] = tmp;\n\n\t\t\tiy -= M;\n\t\t}\n\t\treturn x;\n\t}\n\tif ( stride < 0 ) {\n\t\tix = (1-N) * stride;\n\t} else {\n\t\tix = 0;\n\t}\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = x[ iy ];\n\t\tx[ iy ] = tmp;\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = srev;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar floor = require( '@stdlib/math-base-special-floor' );\n\n\n// VARIABLES //\n\nvar M = 3;\n\n\n// MAIN //\n\n/**\n* Reverses a single-precision floating-point strided array in-place.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Float32Array} x - input array\n* @param {integer} stride - index increment\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} input array\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n*\n* var x = new Float32Array( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );\n*\n* srev( 3, x, 1, x.length-3 );\n* // x => <Float32Array>[ 1.0, -2.0, 3.0, -6.0, 5.0, -4.0 ]\n*/\nfunction srev( N, x, stride, offset ) {\n\tvar tmp;\n\tvar ix;\n\tvar iy;\n\tvar m;\n\tvar n;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn x;\n\t}\n\tn = floor( N/2 );\n\tix = offset;\n\n\t// Use loop unrolling if the stride is equal to `1`...\n\tif ( stride === 1 ) {\n\t\tm = n % M;\n\t\tiy = ix + N - 1;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ttmp = x[ ix ];\n\t\t\t\tx[ ix ] = x[ iy ];\n\t\t\t\tx[ iy ] = tmp;\n\t\t\t\tix += stride;\n\t\t\t\tiy -= stride;\n\t\t\t}\n\t\t}\n\t\tif ( n < M ) {\n\t\t\treturn x;\n\t\t}\n\t\tfor ( i = m; i < n; i += M ) {\n\t\t\ttmp = x[ ix ];\n\t\t\tx[ ix ] = x[ iy ];\n\t\t\tx[ iy ] = tmp;\n\n\t\t\ttmp = x[ ix+1 ];\n\t\t\tx[ ix+1 ] = x[ iy-1 ];\n\t\t\tx[ iy-1 ] = tmp;\n\n\t\t\ttmp = x[ ix+2 ];\n\t\t\tx[ ix+2 ] = x[ iy-2 ];\n\t\t\tx[ iy-2 ] = tmp;\n\n\t\t\tix += M;\n\t\t\tiy -= M;\n\t\t}\n\t\treturn x;\n\t}\n\tiy = ix + ((N-1)*stride);\n\tfor ( i = 0; i < n; i++ ) {\n\t\ttmp = x[ ix ];\n\t\tx[ ix ] = x[ iy ];\n\t\tx[ iy ] = tmp;\n\t\tix += stride;\n\t\tiy -= stride;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nmodule.exports = srev;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar setReadOnly = require( '@stdlib/utils-define-nonenumerable-read-only-property' );\nvar srev = require( './srev.js' );\nvar ndarray = require( './ndarray.js' );\n\n\n// MAIN //\n\nsetReadOnly( srev, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nmodule.exports = srev;\n", "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Reverse a single-precision floating-point strided array in-place.\n*\n* @module @stdlib/blas-ext-base-srev\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var srev = require( '@stdlib/blas-ext-base-srev' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* srev( x.length, x, 1 );\n* // x => <Float32Array>[ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*\n* @example\n* var Float32Array = require( '@stdlib/array-float32' );\n* var srev = require( '@stdlib/blas-ext-base-srev' );\n*\n* var x = new Float32Array( [ -2.0, 1.0, 3.0, -5.0, 4.0, 0.0, -1.0, -3.0 ] );\n*\n* srev( x.length, x, 1, 0 );\n* // x => <Float32Array>[ -3.0, -1.0, 0.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]\n*/\n\n// MODULES //\n\nvar join = require( 'path' ).join;\nvar tryRequire = require( '@stdlib/utils-try-require' );\nvar isError = require( '@stdlib/assert-is-error' );\nvar main = require( './main.js' );\n\n\n// MAIN //\n\nvar srev;\nvar tmp = tryRequire( join( __dirname, './native.js' ) );\nif ( isError( tmp ) ) {\n\tsrev = main;\n} else {\n\tsrev = tmp;\n}\n\n\n// EXPORTS //\n\nmodule.exports = srev;\n\n// exports: { \"ndarray\": \"srev.ndarray\" }\n"],
5
+ "mappings": "uGAAA,IAAAA,EAAAC,EAAA,SAAAC,EAAAC,EAAA,cAsBA,IAAIC,EAAQ,QAAS,iCAAkC,EAKnDC,EAAI,EAqBR,SAASC,EAAMC,EAAGC,EAAGC,EAAS,CAC7B,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EAEJ,GAAKR,GAAK,EACT,OAAOC,EAKR,GAHAM,EAAIV,E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QAAS,yBAA0B,EAC7CC,EAAO,IAKPC,EACAC,EAAMJ,EAAYD,EAAM,UAAW,aAAc,CAAE,EAClDE,EAASG,CAAI,EACjBD,EAAOD,EAEPC,EAAOC,EAMR,OAAO,QAAUD",
6
+ "names": ["require_srev", "__commonJSMin", "exports", "module", "floor", "M", "srev", "N", "x", "stride", "tmp", "ix", "iy", "m", "n", "i", "require_ndarray", "__commonJSMin", "exports", "module", "floor", "M", "srev", "N", "x", "stride", "offset", "tmp", "ix", "iy", "m", "n", "i", "require_main", "__commonJSMin", "exports", "module", "setReadOnly", "srev", "ndarray", "join", "tryRequire", "isError", "main", "srev", "tmp"]
7
+ }
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- // TypeScript Version: 2.0
19
+ // TypeScript Version: 4.1
20
20
 
21
21
  /**
22
22
  * Interface describing `srev`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stdlib/blas-ext-base-srev",
3
- "version": "0.0.11",
3
+ "version": "0.1.0",
4
4
  "description": "Reverse a single-precision floating-point strided array in-place.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -41,24 +41,24 @@
41
41
  "url": "https://github.com/stdlib-js/stdlib/issues"
42
42
  },
43
43
  "dependencies": {
44
- "@stdlib/assert-is-error": "^0.0.x",
45
- "@stdlib/math-base-special-floor": "^0.0.x",
46
- "@stdlib/utils-define-nonenumerable-read-only-property": "^0.0.x",
47
- "@stdlib/utils-library-manifest": "^0.0.x",
48
- "@stdlib/utils-try-require": "^0.0.x"
44
+ "@stdlib/assert-is-error": "^0.1.0",
45
+ "@stdlib/math-base-special-floor": "^0.1.0",
46
+ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.1.0",
47
+ "@stdlib/utils-library-manifest": "^0.1.0",
48
+ "@stdlib/utils-try-require": "^0.1.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@stdlib/array-float32": "^0.0.x",
52
- "@stdlib/assert-is-browser": "^0.0.x",
53
- "@stdlib/bench": "^0.0.x",
54
- "@stdlib/math-base-assert-is-nanf": "^0.0.x",
55
- "@stdlib/math-base-special-pow": "^0.0.x",
56
- "@stdlib/math-base-special-round": "^0.0.x",
57
- "@stdlib/random-base-randu": "^0.0.x",
51
+ "@stdlib/array-float32": "^0.1.0",
52
+ "@stdlib/assert-is-browser": "^0.1.0",
53
+ "@stdlib/bench": "^0.1.0",
54
+ "@stdlib/math-base-assert-is-nanf": "^0.1.0",
55
+ "@stdlib/math-base-special-pow": "^0.0.7",
56
+ "@stdlib/math-base-special-round": "^0.1.0",
57
+ "@stdlib/random-base-randu": "^0.0.8",
58
58
  "proxyquire": "^2.0.0",
59
59
  "tape": "git+https://github.com/kgryte/tape.git#fix/globby",
60
60
  "istanbul": "^0.4.1",
61
- "tap-spec": "5.x.x"
61
+ "tap-min": "git+https://github.com/Planeshifter/tap-min.git"
62
62
  },
63
63
  "engines": {
64
64
  "node": ">=0.10.0",
@@ -96,7 +96,7 @@
96
96
  ],
97
97
  "__stdlib__": {},
98
98
  "funding": {
99
- "type": "patreon",
100
- "url": "https://www.patreon.com/athan"
99
+ "type": "opencollective",
100
+ "url": "https://opencollective.com/stdlib"
101
101
  }
102
102
  }
package/docs/repl.txt DELETED
@@ -1,93 +0,0 @@
1
-
2
- {{alias}}( N, x, stride )
3
- Reverses a single-precision floating-point strided array in-place.
4
-
5
- The `N` and `stride` parameters determine which elements in `x` are accessed
6
- at runtime.
7
-
8
- Indexing is relative to the first index. To introduce an offset, use typed
9
- array views.
10
-
11
- If `N <= 0`, the function returns `x` unchanged.
12
-
13
- Parameters
14
- ----------
15
- N: integer
16
- Number of indexed elements.
17
-
18
- x: Float32Array
19
- Input array.
20
-
21
- stride: integer
22
- Index increment for `x`.
23
-
24
- Returns
25
- -------
26
- x: Float32Array
27
- Input array `x`.
28
-
29
- Examples
30
- --------
31
- // Standard Usage:
32
- > var x = new {{alias:@stdlib/array/float32}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, -1.0, -3.0 ] );
33
- > {{alias}}( x.length, x, 1 )
34
- <Float32Array>[ -3.0, -1.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]
35
-
36
- // Using `N` and `stride` parameters:
37
- > x = new {{alias:@stdlib/array/float32}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, -1.0, -3.0 ] );
38
- > var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
39
- > {{alias}}( N, x, 2 )
40
- <Float32Array>[ 4.0, 1.0, 3.0, -5.0, -2.0, -1.0, -3.0 ]
41
-
42
- // Using view offsets:
43
- > var x0 = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
44
- > var x1 = new {{alias:@stdlib/array/float32}}( x0.buffer, x0.BYTES_PER_ELEMENT*1 );
45
- > N = {{alias:@stdlib/math/base/special/floor}}( x0.length / 2 );
46
- > {{alias}}( N, x1, 2 )
47
- <Float32Array>[ -6.0, 3.0, -4.0, 5.0, -2.0 ]
48
- > x0
49
- <Float32Array>[ 1.0, -6.0, 3.0, -4.0, 5.0, -2.0 ]
50
-
51
- {{alias}}.ndarray( N, x, stride, offset )
52
- Reverses a single-precision floating-point strided array in-place using
53
- alternative indexing semantics.
54
-
55
- While typed array views mandate a view offset based on the underlying
56
- buffer, the `offset` parameter supports indexing semantics based on a
57
- starting index.
58
-
59
- Parameters
60
- ----------
61
- N: integer
62
- Number of indexed elements.
63
-
64
- x: Float32Array
65
- Input array.
66
-
67
- stride: integer
68
- Index increment for `x`.
69
-
70
- offset: integer
71
- Starting index of `x`.
72
-
73
- Returns
74
- -------
75
- x: Float32Array
76
- Input array `x`.
77
-
78
- Examples
79
- --------
80
- // Standard Usage:
81
- > var x = new {{alias:@stdlib/array/float32}}( [ -2.0, 1.0, 3.0, -5.0, 4.0, -1.0, -3.0 ] );
82
- > {{alias}}.ndarray( x.length, x, 1, 0 )
83
- <Float32Array>[ -3.0, -1.0, 4.0, -5.0, 3.0, 1.0, -2.0 ]
84
-
85
- // Using an index offset:
86
- > x = new {{alias:@stdlib/array/float32}}( [ 1.0, -2.0, 3.0, -4.0, 5.0, -6.0 ] );
87
- > var N = {{alias:@stdlib/math/base/special/floor}}( x.length / 2 );
88
- > {{alias}}.ndarray( N, x, 2, 1 )
89
- <Float32Array>[ 1.0, -6.0, 3.0, -4.0, 5.0, -2.0 ]
90
-
91
- See Also
92
- --------
93
-
@@ -1,157 +0,0 @@
1
- /*
2
- * @license Apache-2.0
3
- *
4
- * Copyright (c) 2020 The Stdlib Authors.
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
-
19
- import srev = require( './index' );
20
-
21
-
22
- // TESTS //
23
-
24
- // The function returns a Float32Array...
25
- {
26
- const x = new Float32Array( 10 );
27
-
28
- srev( x.length, x, 1 ); // $ExpectType Float32Array
29
- }
30
-
31
- // The compiler throws an error if the function is provided a first argument which is not a number...
32
- {
33
- const x = new Float32Array( 10 );
34
-
35
- srev( '10', x, 1 ); // $ExpectError
36
- srev( true, x, 1 ); // $ExpectError
37
- srev( false, x, 1 ); // $ExpectError
38
- srev( null, x, 1 ); // $ExpectError
39
- srev( undefined, x, 1 ); // $ExpectError
40
- srev( [], x, 1 ); // $ExpectError
41
- srev( {}, x, 1 ); // $ExpectError
42
- srev( ( x: number ): number => x, x, 1 ); // $ExpectError
43
- }
44
-
45
- // The compiler throws an error if the function is provided a second argument which is not a Float32Array...
46
- {
47
- const x = new Float32Array( 10 );
48
-
49
- srev( x.length, 10, 1 ); // $ExpectError
50
- srev( x.length, '10', 1 ); // $ExpectError
51
- srev( x.length, true, 1 ); // $ExpectError
52
- srev( x.length, false, 1 ); // $ExpectError
53
- srev( x.length, null, 1 ); // $ExpectError
54
- srev( x.length, undefined, 1 ); // $ExpectError
55
- srev( x.length, [], 1 ); // $ExpectError
56
- srev( x.length, {}, 1 ); // $ExpectError
57
- srev( x.length, ( x: number ): number => x, 1 ); // $ExpectError
58
- }
59
-
60
- // The compiler throws an error if the function is provided a third argument which is not a number...
61
- {
62
- const x = new Float32Array( 10 );
63
-
64
- srev( x.length, x, '10' ); // $ExpectError
65
- srev( x.length, x, true ); // $ExpectError
66
- srev( x.length, x, false ); // $ExpectError
67
- srev( x.length, x, null ); // $ExpectError
68
- srev( x.length, x, undefined ); // $ExpectError
69
- srev( x.length, x, [] ); // $ExpectError
70
- srev( x.length, x, {} ); // $ExpectError
71
- srev( x.length, x, ( x: number ): number => x ); // $ExpectError
72
- }
73
-
74
- // The compiler throws an error if the function is provided an unsupported number of arguments...
75
- {
76
- const x = new Float32Array( 10 );
77
-
78
- srev(); // $ExpectError
79
- srev( x.length ); // $ExpectError
80
- srev( x.length, x ); // $ExpectError
81
- srev( x.length, x, 1, 10 ); // $ExpectError
82
- }
83
-
84
- // Attached to main export is an `ndarray` method which returns a Float32Array...
85
- {
86
- const x = new Float32Array( 10 );
87
-
88
- srev.ndarray( x.length, x, 1, 0 ); // $ExpectType Float32Array
89
- }
90
-
91
- // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
92
- {
93
- const x = new Float32Array( 10 );
94
-
95
- srev.ndarray( '10', x, 1, 0 ); // $ExpectError
96
- srev.ndarray( true, x, 1, 0 ); // $ExpectError
97
- srev.ndarray( false, x, 1, 0 ); // $ExpectError
98
- srev.ndarray( null, x, 1, 0 ); // $ExpectError
99
- srev.ndarray( undefined, x, 1, 0 ); // $ExpectError
100
- srev.ndarray( [], x, 1, 0 ); // $ExpectError
101
- srev.ndarray( {}, x, 1, 0 ); // $ExpectError
102
- srev.ndarray( ( x: number ): number => x, x, 1, 0 ); // $ExpectError
103
- }
104
-
105
- // The compiler throws an error if the `ndarray` method is provided a second argument which is not a Float32Array...
106
- {
107
- const x = new Float32Array( 10 );
108
-
109
- srev.ndarray( x.length, 10, 1, 0 ); // $ExpectError
110
- srev.ndarray( x.length, '10', 1, 0 ); // $ExpectError
111
- srev.ndarray( x.length, true, 1, 0 ); // $ExpectError
112
- srev.ndarray( x.length, false, 1, 0 ); // $ExpectError
113
- srev.ndarray( x.length, null, 1, 0 ); // $ExpectError
114
- srev.ndarray( x.length, undefined, 1, 0 ); // $ExpectError
115
- srev.ndarray( x.length, [], 1, 0 ); // $ExpectError
116
- srev.ndarray( x.length, {}, 1, 0 ); // $ExpectError
117
- srev.ndarray( x.length, ( x: number ): number => x, 1, 0 ); // $ExpectError
118
- }
119
-
120
- // The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
121
- {
122
- const x = new Float32Array( 10 );
123
-
124
- srev.ndarray( x.length, x, '10', 0 ); // $ExpectError
125
- srev.ndarray( x.length, x, true, 0 ); // $ExpectError
126
- srev.ndarray( x.length, x, false, 0 ); // $ExpectError
127
- srev.ndarray( x.length, x, null, 0 ); // $ExpectError
128
- srev.ndarray( x.length, x, undefined, 0 ); // $ExpectError
129
- srev.ndarray( x.length, x, [], 0 ); // $ExpectError
130
- srev.ndarray( x.length, x, {}, 0 ); // $ExpectError
131
- srev.ndarray( x.length, x, ( x: number ): number => x, 0 ); // $ExpectError
132
- }
133
-
134
- // The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
135
- {
136
- const x = new Float32Array( 10 );
137
-
138
- srev.ndarray( x.length, x, 1, '10' ); // $ExpectError
139
- srev.ndarray( x.length, x, 1, true ); // $ExpectError
140
- srev.ndarray( x.length, x, 1, false ); // $ExpectError
141
- srev.ndarray( x.length, x, 1, null ); // $ExpectError
142
- srev.ndarray( x.length, x, 1, undefined ); // $ExpectError
143
- srev.ndarray( x.length, x, 1, [] ); // $ExpectError
144
- srev.ndarray( x.length, x, 1, {} ); // $ExpectError
145
- srev.ndarray( x.length, x, 1, ( x: number ): number => x ); // $ExpectError
146
- }
147
-
148
- // The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
149
- {
150
- const x = new Float32Array( 10 );
151
-
152
- srev.ndarray(); // $ExpectError
153
- srev.ndarray( x.length ); // $ExpectError
154
- srev.ndarray( x.length, x ); // $ExpectError
155
- srev.ndarray( x.length, x, 1 ); // $ExpectError
156
- srev.ndarray( x.length, x, 1, 0, 10 ); // $ExpectError
157
- }