README.md (6829B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2020 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # Base 22 23 > Base strided. 24 25 <section class="usage"> 26 27 ## Usage 28 29 ```javascript 30 var ns = require( '@stdlib/strided/base' ); 31 ``` 32 33 #### ns 34 35 Base strided. 36 37 ```javascript 38 var o = ns; 39 // returns {...} 40 ``` 41 42 The following functions are currently exported: 43 44 <!-- <toc pattern="*"> --> 45 46 <div class="namespace-toc"> 47 48 - <span class="signature">[`binary( arrays, shape, strides, fcn )`][@stdlib/strided/base/binary]</span><span class="delimiter">: </span><span class="description">apply a binary callback to strided input array elements and assign results to elements in a strided output array.</span> 49 - <span class="signature">[`dmap( N, x, strideX, y, strideY, fcn )`][@stdlib/strided/base/dmap]</span><span class="delimiter">: </span><span class="description">apply a unary function accepting and returning double-precision floating-point numbers to each element in a double-precision floating-point strided input array and assign each result to an element in a double-precision floating-point strided output array.</span> 50 - <span class="signature">[`dmskmap( N, x, strideX, mask, strideMask, y, strideY, fcn )`][@stdlib/strided/base/dmskmap]</span><span class="delimiter">: </span><span class="description">apply a unary function accepting and returning double-precision floating-point numbers to each element in a double-precision floating-point strided input array according to a corresponding element in a strided mask array and assign each result to an element in a double-precision floating-point strided output array.</span> 51 - <span class="signature">[`mapBy( N, x, strideX, y, strideY, fcn, clbk[, thisArg] )`][@stdlib/strided/base/map-by]</span><span class="delimiter">: </span><span class="description">apply a unary function to each element retrieved from a strided input array according to a callback function and assign each result to an element in a strided output array.</span> 52 - <span class="signature">[`mskunary( arrays, shape, strides, fcn )`][@stdlib/strided/base/mskunary]</span><span class="delimiter">: </span><span class="description">apply a unary callback to elements in a strided input array according to elements in a strided mask array and assign results to elements in a strided output array.</span> 53 - <span class="signature">[`nullary( arrays, shape, strides, fcn )`][@stdlib/strided/base/nullary]</span><span class="delimiter">: </span><span class="description">apply a nullary callback and assign results to elements in a strided output array.</span> 54 - <span class="signature">[`quaternary( arrays, shape, strides, fcn )`][@stdlib/strided/base/quaternary]</span><span class="delimiter">: </span><span class="description">apply a quaternary callback to strided input array elements and assign results to elements in a strided output array.</span> 55 - <span class="signature">[`quinary( arrays, shape, strides, fcn )`][@stdlib/strided/base/quinary]</span><span class="delimiter">: </span><span class="description">apply a quinary callback to strided input array elements and assign results to elements in a strided output array.</span> 56 - <span class="signature">[`smap( N, x, strideX, y, strideY, fcn )`][@stdlib/strided/base/smap]</span><span class="delimiter">: </span><span class="description">apply a unary function accepting and returning single-precision floating-point numbers to each element in a single-precision floating-point strided input array and assign each result to an element in a single-precision floating-point strided output array.</span> 57 - <span class="signature">[`smskmap( N, x, strideX, mask, strideMask, y, strideY, fcn )`][@stdlib/strided/base/smskmap]</span><span class="delimiter">: </span><span class="description">apply a unary function accepting and returning single-precision floating-point numbers to each element in a single-precision floating-point strided input array according to a corresponding element in a strided mask array and assign each result to an element in a single-precision floating-point strided output array.</span> 58 - <span class="signature">[`ternary( arrays, shape, strides, fcn )`][@stdlib/strided/base/ternary]</span><span class="delimiter">: </span><span class="description">apply a ternary callback to strided input array elements and assign results to elements in a strided output array.</span> 59 - <span class="signature">[`unary( arrays, shape, strides, fcn )`][@stdlib/strided/base/unary]</span><span class="delimiter">: </span><span class="description">apply a unary callback to elements in a strided input array and assign results to elements in a strided output array.</span> 60 61 </div> 62 63 <!-- </toc> --> 64 65 </section> 66 67 <!-- /.usage --> 68 69 <section class="examples"> 70 71 ## Examples 72 73 <!-- TODO: better examples --> 74 75 <!-- eslint no-undef: "error" --> 76 77 ```javascript 78 var objectKeys = require( '@stdlib/utils/keys' ); 79 var ns = require( '@stdlib/strided/base' ); 80 81 console.log( objectKeys( ns ) ); 82 ``` 83 84 </section> 85 86 <!-- /.examples --> 87 88 <section class="links"> 89 90 <!-- <toc-links> --> 91 92 [@stdlib/strided/base/binary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/binary 93 94 [@stdlib/strided/base/dmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/dmap 95 96 [@stdlib/strided/base/dmskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/dmskmap 97 98 [@stdlib/strided/base/map-by]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/map-by 99 100 [@stdlib/strided/base/mskunary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/mskunary 101 102 [@stdlib/strided/base/nullary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/nullary 103 104 [@stdlib/strided/base/quaternary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/quaternary 105 106 [@stdlib/strided/base/quinary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/quinary 107 108 [@stdlib/strided/base/smap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/smap 109 110 [@stdlib/strided/base/smskmap]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/smskmap 111 112 [@stdlib/strided/base/ternary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/ternary 113 114 [@stdlib/strided/base/unary]: https://www.npmjs.com/package/@stdlib/strided/tree/main/base/unary 115 116 <!-- </toc-links> --> 117 118 </section> 119 120 <!-- /.links -->