diff --git a/lib/node_modules/@stdlib/math/array/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/array/docs/types/index.d.ts index b6641a468144..943ee8078750 100644 --- a/lib/node_modules/@stdlib/math/array/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/array/docs/types/index.d.ts @@ -24,22 +24,22 @@ import special = require( '@stdlib/math/array/special' ); import tools = require( '@stdlib/math/array/tools' ); /** -* Interface describing the namespace. +* Interface describing the `array` namespace. */ interface Namespace { /** - * Special math functions. + * Namespace. */ special: typeof special; /** - * Math tools. + * Math array function tools. */ tools: typeof tools; } /** -* Standard math. +* Math functions applied to arrays. */ declare var ns: Namespace; diff --git a/lib/node_modules/@stdlib/math/array/special/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/array/special/docs/types/index.d.ts index 225faecd76a5..7aeafecc5986 100644 --- a/lib/node_modules/@stdlib/math/array/special/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/array/special/docs/types/index.d.ts @@ -23,18 +23,33 @@ import abs = require( '@stdlib/math/array/special/abs' ); /** -* Interface describing the namespace. +* Interface describing the `special` namespace. */ interface Namespace { /** - * TODO + * Computes the absolute value for each element in an input array. + * + * @param x - input array + * @param options - function options + * @returns output array + * + * @example + * var out = ns.abs( [ -1.0, -2.0, -3.0 ] ); + * // returns [ 1.0, 2.0, 3.0 ] + * + * @example + * var y = [ 0.0, 0.0, 0.0 ]; + * + * var out = ns.abs.assign( [ -1.0, -2.0, -3.0 ], y ); + * // returns [ 1.0, 2.0, 3.0 ] + * + * var bool = ( out === y ); */ abs: typeof abs; - } /** -* Namespace. +* Special math functions applied to arrays. */ declare var ns: Namespace; diff --git a/lib/node_modules/@stdlib/math/array/tools/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/array/tools/docs/types/index.d.ts index b9b2cc5514be..d5c8e5cce4ca 100644 --- a/lib/node_modules/@stdlib/math/array/tools/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/array/tools/docs/types/index.d.ts @@ -21,16 +21,63 @@ /* eslint-disable max-lines */ import unary = require( '@stdlib/math/array/tools/unary' ); +import unaryFactory = require( '@stdlib/math/array/tools/unary-factory' ); /** * Interface describing the `tools` namespace. */ interface Namespace { /** - * TODO + * Constructor for applying a unary function to each element in a provided array. + * + * @param fcn - unary function to apply + * @param idtypes - list of supported input data types + * @param odtypes - list of supported output data types + * @param policy - output data type policy + * @returns instance + * + * @example + * var base = require( '@stdlib/math/base/special/abs' ); + * var dtypes = require( '@stdlib/array/dtypes' ); + * + * var idt = dtypes( 'real_and_generic' ); + * var odt = idt; + * var policy = 'same'; + * + * var abs = new Unary( base, idt, odt, policy ); + * + * var x = [ -1.0, -2.0, -3.0 ]; + * + * var y = abs.apply( x ); + * // returns [ 1.0, 2.0, 3.0 ] */ unary: typeof unary; + /** + * Creates a function for applying a unary function to each element in a provided array. + * + * @param fcn - unary function to apply + * @param idtypes - list of supported input data types + * @param odtypes - list of supported output data types + * @param policy - output data type policy + * @returns function for applying a unary function + * + * @example + * var base = require( '@stdlib/math/base/special/abs' ); + * var dtypes = require( '@stdlib/array/dtypes' ); + * + * var idt = dtypes( 'real_and_generic' ); + * var odt = idt; + * var policy = 'same'; + * + * var abs = ns.unaryFactory( base, idt, odt, policy ); + * + * var x = [ -1.0, -2.0, -3.0 ]; + * + * var y = abs( x ); + * // returns [ 1.0, 2.0, 3.0 ] + */ + unaryFactory: typeof unaryFactory; } /** diff --git a/lib/node_modules/@stdlib/math/base/ops/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/ops/docs/types/index.d.ts index 914d64ff8097..2f780a32c7ac 100644 --- a/lib/node_modules/@stdlib/math/base/ops/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/ops/docs/types/index.d.ts @@ -31,7 +31,6 @@ import csub = require( '@stdlib/math/base/ops/csub' ); import csubf = require( '@stdlib/math/base/ops/csubf' ); import imul = require( '@stdlib/math/base/ops/imul' ); import imuldw = require( '@stdlib/math/base/ops/imuldw' ); -import mulf = require( '@stdlib/number/float32/base/mul' ); import subf = require( '@stdlib/math/base/ops/subf' ); import umul = require( '@stdlib/math/base/ops/umul' ); import umuldw = require( '@stdlib/math/base/ops/umuldw' ); @@ -447,35 +446,6 @@ interface Namespace { */ imuldw: typeof imuldw; - /** - * Multiplies two single-precision floating-point numbers `x` and `y`. - * - * @param x - first input value - * @param y - second input value - * @returns result - * - * @example - * var v = ns.mulf( -1.0, 5.0 ); - * // returns -5.0 - * - * @example - * var v = ns.mulf( 2.0, 5.0 ); - * // returns 10.0 - * - * @example - * var v = ns.mulf( 0.0, 5.0 ); - * // returns 0.0 - * - * @example - * var v = ns.mulf( -0.0, 0.0 ); - * // returns -0.0 - * - * @example - * var v = ns.mulf( NaN, NaN ); - * // returns NaN - */ - mulf: typeof mulf; - /** * Subtracts two single-precision floating-point numbers `x` and `y`. * diff --git a/lib/node_modules/@stdlib/math/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/docs/types/index.d.ts index 228f14cc0de9..0b84cbde01ec 100644 --- a/lib/node_modules/@stdlib/math/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/docs/types/index.d.ts @@ -20,6 +20,7 @@ /* eslint-disable max-lines */ +import array = require( '@stdlib/math/array' ); import base = require( '@stdlib/math/base' ); import iter = require( '@stdlib/math/iter' ); import special = require( '@stdlib/math/special' ); @@ -30,6 +31,11 @@ import tools = require( '@stdlib/math/tools' ); * Interface describing the `math` namespace. */ interface Namespace { + /** + * Math functions applied to arrays. + */ + array: typeof array; + /** * Base (i.e., lower-level) math functions. */ diff --git a/lib/node_modules/@stdlib/ndarray/base/assert/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/base/assert/docs/types/index.d.ts index dac43c256839..85495feb8817 100644 --- a/lib/node_modules/@stdlib/ndarray/base/assert/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/base/assert/docs/types/index.d.ts @@ -38,6 +38,7 @@ import isIntegerDataType = require( '@stdlib/ndarray/base/assert/is-integer-data import isMostlySafeDataTypeCast = require( '@stdlib/ndarray/base/assert/is-mostly-safe-data-type-cast' ); import isNumericDataType = require( '@stdlib/ndarray/base/assert/is-numeric-data-type' ); import isOrder = require( '@stdlib/ndarray/base/assert/is-order' ); +import isOutputDataTypePolicy = require( '@stdlib/ndarray/base/assert/is-output-data-type-policy' ); import isReadOnly = require( '@stdlib/ndarray/base/assert/is-read-only' ); import isRealDataType = require( '@stdlib/ndarray/base/assert/is-real-data-type' ); import isRealFloatingPointDataType = require( '@stdlib/ndarray/base/assert/is-real-floating-point-data-type' ); @@ -602,6 +603,27 @@ interface Namespace { */ isOrder: typeof isOrder; + /** + * Tests whether an input value is a supported ndarray output data type policy. + * + * @param v - value to test + * @returns boolean indicating whether an input value is a supported ndarray output data type policy + * + * @example + * var bool = ns.isOutputDataTypePolicy( 'boolean' ); + * // returns true + * + * bool = ns.isOutputDataTypePolicy( 'real' ); + * // returns true + * + * bool = ns.isOutputDataTypePolicy( 'numeric' ); + * // returns true + * + * bool = ns.isOutputDataTypePolicy( 'foo' ); + * // returns false + */ + isOutputDataTypePolicy: typeof isOutputDataTypePolicy; + /** * Tests whether an ndarray is read-only. * diff --git a/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts index 6f5b52582423..170d34e30c69 100644 --- a/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts @@ -1174,15 +1174,24 @@ interface Namespace { * * - `same`: return the same data type. * - `promoted`: return a promoted data type. - * - `bool`: return a boolean data type. - * - `numeric`: return a numeric data type. - * - `real`: return a real-valued data type. + * - `boolean`: return a boolean data type. + * - `boolean_and_generic`: return a boolean or "generic" data type. * - `signed_integer`: return a signed integer data type. + * - `signed_integer_and_generic`: return a signed integer or "generic" data type. * - `unsigned_integer`: return an unsigned integer data type. + * - `unsigned_integer_and_generic`: return an unsigned integer or "generic" data type. * - `integer`: return an integer data type (i.e., either signed or unsigned). + * - `integer_and_generic`: return an integer (i.e., either signed or unsigned) or "generic" data type. * - `floating_point`: return a floating-point data type (i.e., either real-valued or complex-valued). + * - `floating_point_and_generic`: return a floating-point (i.e., either real-valued or complex-valued) or "generic" data type. * - `real_floating_point`: return a real-valued floating-point data type. + * - `real_floating_point_and_generic`: return a real-valued or "generic" floating-point data type. * - `complex_floating_point`: return a complex-valued floating-point data type. + * - `complex_floating_point_and_generic`: return a complex-valued or "generic" floating-point data type. + * - `real`: return a real-valued data type. + * - `real_and_generic`: return a real-valued or "generic" data type. + * - `numeric`: return a numeric data type. + * - `numeric_and_generic`: return a numeric or "generic" data type. * - `default`: return the default data type. * * @returns list of data type policies diff --git a/lib/node_modules/@stdlib/stats/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/docs/types/index.d.ts index 3b99df335fc6..33d119323281 100644 --- a/lib/node_modules/@stdlib/stats/base/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/docs/types/index.d.ts @@ -2556,9 +2556,9 @@ interface Namespace { * * @param N - number of indexed elements * @param x - input array - * @param strideX - `x` stride length + * @param strideX - stride length for `x` * @param mask - mask array - * @param strideMask - `mask` stride length + * @param strideMask - stride length for `mask` * @returns minimum value * * @example @@ -2582,9 +2582,9 @@ interface Namespace { * * @param N - number of indexed elements * @param x - input array - * @param strideX - `x` stride length + * @param strideX - stride length for `x` * @param mask - mask array - * @param strideMask - `mask` stride length + * @param strideMask - stride length for `mask` * @returns range * * @example