About stdlib...
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.
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.
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.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Base strided.
npm install @stdlib/strided-base
Alternatively,
- To load the package in a website via a
script
tag without installation and bundlers, use the ES Module available on theesm
branch (see README). - If you are using Deno, visit the
deno
branch (see README for usage intructions). - For use in Observable, or in browser/node environments, use the Universal Module Definition (UMD) build available on the
umd
branch (see README).
The branches.md file summarizes the available branches and displays a diagram illustrating their relationships.
To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.
var ns = require( '@stdlib/strided-base' );
Base strided.
var o = ns;
// returns {...}
The following functions are currently exported:
binaryAddonDispatch( addon, fallback )
: dispatch to a native add-on applying a binary function to two input strided arrays.binaryDtypeSignatures( dtypes1, dtypes2, dtypes3[, options] )
: generate a list of binary interface signatures from strided array data types.binarySignatureCallbacks( table, signatures )
: assign callbacks to binary interfaces according to type promotion rules.binary( arrays, shape, strides, fcn )
: apply a binary callback to strided input array elements and assign results to elements in a strided output array.cmap( N, x, strideX, y, strideY, fcn )
: apply a unary function to a single-precision floating-point strided input array and assign results to a single-precision floating-point strided output array.dmap( N, x, strideX, y, strideY, fcn )
: apply a unary function to a double-precision floating-point strided input array and assign results to a double-precision floating-point strided output array.dmap2( N, x, strideX, y, strideY, z, strideZ, fcn )
: apply a binary function to double-precision floating-point strided input arrays and assign results to a double-precision floating-point strided output array.dmskmap( N, x, strideX, mask, strideMask, y, strideY, fcn )
: apply a unary function to a double-precision floating-point strided input array according to a strided mask array and assign results to a double-precision floating-point strided output array.dmskmap2( N, x, strideX, y, strideY, mask, strideMask, z, strideZ, fcn )
: apply a binary function to double-precision floating-point strided input arrays according to a strided mask array and assign results to a double-precision floating-point strided output array.dtypeEnum2Str( dtype )
: return the data type string associated with a strided array data type enumeration constant.dtypeResolveEnum( dtype )
: return the enumeration constant associated with a supported strided array data type value.dtypeResolveStr( dtype )
: return the data type string associated with a supported strided array data type value.dtypeStr2Enum( dtype )
: return the enumeration constant associated with a strided array data type string.mapBy( N, x, strideX, y, strideY, fcn, clbk[, thisArg] )
: apply a unary function to each element retrieved from a strided input array according to a callback function and assign results to a strided output array.mapBy2( N, x, strideX, y, strideY, z, strideZ, fcn, clbk[, thisArg] )
: apply a binary function to each pair of elements retrieved from strided input arrays according to a callback function and assign results to a strided output array.maxViewBufferIndex( N, stride, offset )
: return the maximum accessible index based on a set of provided strided array parameters.metaDataProps( meta, dtypes, obj, bool )
: define non-enumerable read-only properties which expose strided array function meta data.minViewBufferIndex( N, stride, offset )
: return the minimum accessible index based on a set of provided strided array parameters.mskunaryAddonDispatch( addon, fallback )
: dispatch to a native add-on applying a unary function to an input strided array according to a mask strided array.mskunaryDtypeSignatures( dtypes1, dtypes2[, options] )
: generate a list of masked unary interface signatures from strided array data types.mskunarySignatureCallbacks( table, signatures )
: assign callbacks to masked unary interfaces according to type promotion rules.mskunary( arrays, shape, strides, fcn )
: 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.nullaryAddonDispatch( addon, fallback )
: dispatch to a native add-on applying a nullary function.nullary( arrays, shape, strides, fcn )
: apply a nullary callback and assign results to elements in a strided output array.offsetView( x, offset )
: return a typed array view having the same data type as a provided input typed array and starting at a specified index offset.quaternary( arrays, shape, strides, fcn )
: apply a quaternary callback to strided input array elements and assign results to elements in a strided output array.quinary( arrays, shape, strides, fcn )
: apply a quinary callback to strided input array elements and assign results to elements in a strided output array.reinterpretBoolean( x, offset )
: reinterpret aBooleanArray
as aUint8Array
.reinterpretComplex( x, offset )
: reinterpret a complex-valued floating-point array as a real-valued floating-point array having the same precision.reinterpretComplex128( x, offset )
: reinterpret aComplex128Array
as aFloat64Array
.reinterpretComplex64( x, offset )
: reinterpret aComplex64Array
as aFloat32Array
.smap( N, x, strideX, y, strideY, fcn )
: apply a unary function to a single-precision floating-point strided input array and assign results to a single-precision floating-point strided output array.smap2( N, x, strideX, y, strideY, z, strideZ, fcn )
: apply a binary function to single-precision floating-point strided input arrays and assign results to a single-precision floating-point strided output array.smskmap( N, x, strideX, mask, strideMask, y, strideY, fcn )
: apply a unary function to a single-precision floating-point strided input array according to a strided mask array and assign results to a single-precision floating-point strided output array.smskmap2( N, x, strideX, y, strideY, mask, strideMask, z, strideZ, fcn )
: apply a binary function to single-precision floating-point strided input arrays according to a strided mask array and assign results to a single-precision floating-point strided output array.stride2offset( N, stride )
: determine the index offset which specifies the location of the first indexed value in a strided array.ternary( arrays, shape, strides, fcn )
: apply a ternary callback to strided input array elements and assign results to elements in a strided output array.unaryAddonDispatch( addon, fallback )
: dispatch to a native add-on applying a unary function to an input strided array.unaryBy( arrays, shape, strides, fcn, clbk[, thisArg] )
: apply a unary function to each element retrieved from a strided input array according to a callback function and assign results to a strided output array.unaryDtypeSignatures( dtypes1, dtypes2[, options] )
: generate a list of unary interface signatures from strided array data types.unarySignatureCallbacks( table, signatures )
: assign callbacks to unary interfaces according to type promotion rules.unary( arrays, shape, strides, fcn )
: apply a unary callback to elements in a strided input array and assign results to elements in a strided output array.zmap( N, x, strideX, y, strideY, fcn )
: apply a unary function to a double-precision floating-point strided input array and assign results to a double-precision floating-point strided output array.
var objectKeys = require( '@stdlib/utils-keys' );
var ns = require( '@stdlib/strided-base' );
console.log( objectKeys( ns ) );
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2024. The Stdlib Authors.