diff --git a/lib/node_modules/@stdlib/constants/float32/docs/types/index.d.ts b/lib/node_modules/@stdlib/constants/float32/docs/types/index.d.ts index d753a81bd9b4..985be2cb9b09 100644 --- a/lib/node_modules/@stdlib/constants/float32/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/constants/float32/docs/types/index.d.ts @@ -22,15 +22,37 @@ import ABS_MASK = require( '@stdlib/constants/float32/abs-mask' ); import CBRT_EPS = require( '@stdlib/constants/float32/cbrt-eps' ); +import E = require( '@stdlib/constants/float32/e' ); import EPS = require( '@stdlib/constants/float32/eps' ); import EXPONENT_BIAS = require( '@stdlib/constants/float32/exponent-bias' ); import EXPONENT_MASK = require( '@stdlib/constants/float32/exponent-mask' ); +import FOURTH_PI = require( '@stdlib/constants/float32/fourth-pi' ); +import HALF_LN_TWO = require( '@stdlib/constants/float32/half-ln-two' ); +import HALF_PI = require( '@stdlib/constants/float32/half-pi' ); +import LN_HALF = require( '@stdlib/constants/float32/ln-half' ); +import LN_PI = require( '@stdlib/constants/float32/ln-pi' ); +import LN_TEN = require( '@stdlib/constants/float32/ln-ten' ); +import LN_TWO = require( '@stdlib/constants/float32/ln-two' ); import MAX = require( '@stdlib/constants/float32/max' ); +import MAX_BASE2_EXPONENT = require( '@stdlib/constants/float32/max-base2-exponent' ); +import MAX_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float32/max-base2-exponent-subnormal' ); +import MAX_BASE10_EXPONENT = require( '@stdlib/constants/float32/max-base10-exponent' ); +import MAX_BASE10_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float32/max-base10-exponent-subnormal' ); +import MAX_SAFE_FIBONACCI = require( '@stdlib/constants/float32/max-safe-fibonacci' ); import MAX_SAFE_INTEGER = require( '@stdlib/constants/float32/max-safe-integer' ); +import MAX_SAFE_NTH_FACTORIAL = require( '@stdlib/constants/float32/max-safe-nth-factorial' ); +import MAX_SAFE_NTH_FIBONACCI = require( '@stdlib/constants/float32/max-safe-nth-fibonacci' ); +import MAX_SAFE_NTH_LUCAS = require( '@stdlib/constants/float32/max-safe-nth-lucas' ); +import MIN_BASE2_EXPONENT = require( '@stdlib/constants/float32/min-base2-exponent' ); +import MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float32/min-base2-exponent-subnormal' ); +import MIN_BASE10_EXPONENT = require( '@stdlib/constants/float32/min-base10-exponent' ); +import MIN_BASE10_EXPONENT_SUBNORMAL = require( '@stdlib/constants/float32/min-base10-exponent-subnormal' ); import MIN_SAFE_INTEGER = require( '@stdlib/constants/float32/min-safe-integer' ); import NAN = require( '@stdlib/constants/float32/nan' ); import NINF = require( '@stdlib/constants/float32/ninf' ); import NUM_BYTES = require( '@stdlib/constants/float32/num-bytes' ); +import PHI = require( '@stdlib/constants/float32/phi' ); +import PI = require( '@stdlib/constants/float32/pi' ); import PINF = require( '@stdlib/constants/float32/pinf' ); import PRECISION = require( '@stdlib/constants/float32/precision' ); import SIGN_MASK = require( '@stdlib/constants/float32/sign-mask' ); @@ -38,6 +60,14 @@ import SIGNIFICAND_MASK = require( '@stdlib/constants/float32/significand-mask' import SMALLEST_NORMAL = require( '@stdlib/constants/float32/smallest-normal' ); import SMALLEST_SUBNORMAL = require( '@stdlib/constants/float32/smallest-subnormal' ); import SQRT_EPS = require( '@stdlib/constants/float32/sqrt-eps' ); +import SQRT_HALF = require( '@stdlib/constants/float32/sqrt-half' ); +import SQRT_HALF_PI = require( '@stdlib/constants/float32/sqrt-half-pi' ); +import SQRT_PHI = require( '@stdlib/constants/float32/sqrt-phi' ); +import SQRT_PI = require( '@stdlib/constants/float32/sqrt-pi' ); +import SQRT_THREE = require( '@stdlib/constants/float32/sqrt-three' ); +import SQRT_TWO = require( '@stdlib/constants/float32/sqrt-two' ); +import SQRT_TWO_PI = require( '@stdlib/constants/float32/sqrt-two-pi' ); +import TWO_PI = require( '@stdlib/constants/float32/two-pi' ); /** * Interface describing the `float32` namespace. @@ -61,6 +91,15 @@ interface Namespace { */ CBRT_EPS: typeof CBRT_EPS; + /** + * Euler's number. + * + * @example + * var e = ns.E; + * // returns 2.7182817459106445 + */ + E: typeof E; + /** * Difference between one and the smallest value greater than one that can be represented as a single-precision floating-point number. * @@ -88,6 +127,69 @@ interface Namespace { */ EXPONENT_MASK: typeof EXPONENT_MASK; + /** + * One fourth times the mathematical constant `π`. + * + * @example + * var val = ns.FOURTH_PI; + * // returns 7.853981852531433e-1 + */ + FOURTH_PI: typeof FOURTH_PI; + + /** + * One half times the natural logarithm of 2 as a single-precision floating-point number. + * + * @example + * var val = ns.HALF_LN_TWO; + * // returns 0.3465735912322998 + */ + HALF_LN_TWO: typeof HALF_LN_TWO; + + /** + * One half times the mathematical constant `π`. + * + * @example + * var val = ns.HALF_PI; + * // returns 1.5707963705062866 + */ + HALF_PI: typeof HALF_PI; + + /** + * Natural logarithm of `1/2` as a single-precision floating-point number. + * + * @example + * var val = ns.LN_HALF; + * // returns -0.6931471824645996 + */ + LN_HALF: typeof LN_HALF; + + /** + * Natural logarithm of the mathematical constant `π` as a single-precision floating-point number. + * + * @example + * var val = ns.LN_PI; + * // returns 1.1447298526763916 + */ + LN_PI: typeof LN_PI; + + /** + * Natural logarithm of `10` as a single-precision floating-point number. + * + * @example + * var val = ns.LN_TEN; + * // returns 2.3025851249694824 + */ + LN_TEN: typeof LN_TEN; + + /** + * Natural logarithm of `2` as a single-precision floating-point number. + * + * @example + * var val = ns.LN_TWO; + * // returns 0.6931471824645996 + */ + LN_TWO: typeof LN_TWO; + /** * Maximum single-precision floating-point number. * @@ -97,6 +199,51 @@ interface Namespace { */ MAX: typeof MAX; + /** + * The maximum biased base 2 exponent for a single-precision floating-point number. + * + * @example + * var exp = ns.MAX_BASE2_EXPONENT; + * // returns 127 + */ + MAX_BASE2_EXPONENT: typeof MAX_BASE2_EXPONENT; + + /** + * The maximum biased base 2 exponent for a subnormal single-precision floating-point number. + * + * @example + * var exp = ns.MAX_BASE2_EXPONENT_SUBNORMAL; + * // returns -127 + */ + MAX_BASE2_EXPONENT_SUBNORMAL: typeof MAX_BASE2_EXPONENT_SUBNORMAL; + + /** + * The maximum base 10 exponent for a single-precision floating-point number. + * + * @example + * var exp = ns.MAX_BASE10_EXPONENT; + * // returns 38 + */ + MAX_BASE10_EXPONENT: typeof MAX_BASE10_EXPONENT; + + /** + * The maximum base 10 exponent for a subnormal single-precision floating-point number. + * + * @example + * var exp = ns.MAX_BASE10_EXPONENT_SUBNORMAL; + * // returns -38 + */ + MAX_BASE10_EXPONENT_SUBNORMAL: typeof MAX_BASE10_EXPONENT_SUBNORMAL; + + /** + * Maximum safe Fibonacci number when stored in single-precision floating-point format. + * + * @example + * var max = ns.MAX_SAFE_FIBONACCI; + * // returns 14930352 + */ + MAX_SAFE_FIBONACCI: typeof MAX_SAFE_FIBONACCI; + /** * Maximum safe single-precision floating-point integer. * @@ -106,6 +253,69 @@ interface Namespace { */ MAX_SAFE_INTEGER: typeof MAX_SAFE_INTEGER; + /** + * Maximum safe nth factorial when stored in single-precision floating-point format. + * + * @example + * var max = ns.MAX_SAFE_NTH_FACTORIAL; + * // returns 34 + */ + MAX_SAFE_NTH_FACTORIAL: typeof MAX_SAFE_NTH_FACTORIAL; + + /** + * Maximum safe nth Fibonacci number when stored in single-precision floating-point format. + * + * @example + * var max = ns.MAX_SAFE_NTH_FIBONACCI; + * // returns 36 + */ + MAX_SAFE_NTH_FIBONACCI: typeof MAX_SAFE_NTH_FIBONACCI; + + /** + * Maximum safe nth Lucas number when stored in single-precision floating-point format. + * + * @example + * var max = ns.MAX_SAFE_NTH_LUCAS; + * // returns 34 + */ + MAX_SAFE_NTH_LUCAS: typeof MAX_SAFE_NTH_LUCAS; + + /** + * The minimum biased base 2 exponent for a normal single-precision floating-point number. + * + * @example + * var min = ns.MIN_BASE2_EXPONENT; + * // returns -126 + */ + MIN_BASE2_EXPONENT: typeof MIN_BASE2_EXPONENT; + + /** + * The minimum biased base 2 exponent for a subnormal single-precision floating-point number. + * + * @example + * var min = ns.MIN_BASE2_EXPONENT_SUBNORMAL; + * // returns -149 + */ + MIN_BASE2_EXPONENT_SUBNORMAL: typeof MIN_BASE2_EXPONENT_SUBNORMAL; + + /** + * The minimum base 10 exponent for a normal single-precision floating-point number. + * + * @example + * var min = ns.MIN_BASE10_EXPONENT; + * // returns -37 + */ + MIN_BASE10_EXPONENT: typeof MIN_BASE10_EXPONENT; + + /** + * The minimum base 10 exponent for a subnormal single-precision floating-point number. + * + * @example + * var min = ns.MIN_BASE10_EXPONENT_SUBNORMAL; + * // returns -45 + */ + MIN_BASE10_EXPONENT_SUBNORMAL: typeof MIN_BASE10_EXPONENT_SUBNORMAL; + /** * Minimum safe single-precision floating-point integer. * @@ -142,6 +352,24 @@ interface Namespace { */ NUM_BYTES: typeof NUM_BYTES; + /** + * Golden ratio. + * + * @example + * var val = ns.PHI; + * // returns 1.6180340051651 + */ + PHI: typeof PHI; + + /** + * The mathematical constant `π`. + * + * @example + * var val = ns.PI; + * // returns 3.1415927410125732 + */ + PI: typeof PI; + /** * Single-precision floating-point positive infinity. * @@ -204,6 +432,78 @@ interface Namespace { * // returns 0.0003452669770922512 */ SQRT_EPS: typeof SQRT_EPS; + + /** + * Square root of `1/2` as a single-precision floating-point number. + * + * @example + * var val = ns.SQRT_HALF; + * // returns 0.7071067690849304 + */ + SQRT_HALF: typeof SQRT_HALF; + + /** + * Square root of the mathematical constant `π` divided by `2` as a single-precision floating-point number. + * + * @example + * var val = ns.SQRT_HALF_PI; + * // returns 1.2533141374588013 + */ + SQRT_HALF_PI: typeof SQRT_HALF_PI; + + /** + * Square root of the golden ratio as a single-precision floating-point number. + * + * @example + * var val = ns.SQRT_PHI; + * // returns 1.272019624710083 + */ + SQRT_PHI: typeof SQRT_PHI; + + /** + * Square root of the mathematical constant `π` as a single-precision floating-point number. + * + * @example + * var val = ns.SQRT_PI; + * // returns 1.7724539041519165 + */ + SQRT_PI: typeof SQRT_PI; + + /** + * Square root of `3` as a single-precision floating-point number. + * + * @example + * var val = ns.SQRT_THREE; + * // returns 1.7320507764816284 + */ + SQRT_THREE: typeof SQRT_THREE; + + /** + * Square root of `2` as a single-precision floating-point number. + * + * @example + * var val = ns.SQRT_TWO; + * // returns 1.4142135381698608 + */ + SQRT_TWO: typeof SQRT_TWO; + + /** + * Square root of the mathematical constant `π` times `2` as a single-precision floating-point number. + * + * @example + * var val = ns.SQRT_TWO_PI; + * // returns 2.5066282749176025 + */ + SQRT_TWO_PI: typeof SQRT_TWO_PI; + + /** + * The mathematical constant `π` times `2`. + * + * @example + * var val = ns.TWO_PI; + * // returns 6.2831854820251465 + */ + TWO_PI: typeof TWO_PI; } /** 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 e8bbbc336ac3..6f5b52582423 100644 --- a/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/docs/types/index.d.ts @@ -39,8 +39,10 @@ import filter = require( '@stdlib/ndarray/filter' ); import filterMap = require( '@stdlib/ndarray/filter-map' ); import flag = require( '@stdlib/ndarray/flag' ); import flags = require( '@stdlib/ndarray/flags' ); +import forEach = require( '@stdlib/ndarray/for-each' ); import scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); import ind2sub = require( '@stdlib/ndarray/ind2sub' ); +import ndindex = require( '@stdlib/ndarray/index' ); import indexModes = require( '@stdlib/ndarray/index-modes' ); import iter = require( '@stdlib/ndarray/iter' ); import map = require( '@stdlib/ndarray/map' ); @@ -674,6 +676,31 @@ interface Namespace { */ flags: typeof flags; + /** + * Invokes a callback function once for each ndarray element. + * + * @param x - input ndarray + * @param fcn - callback function + * @param thisArg - callback function execution context + * + * @example + * var ndarray = require( '@stdlib/ndarray/ctor' ); + * var naryFunction = require( '@stdlib/utils/nary-function' ); + * var log = require( '@stdlib/console/log' ); + * + * var buffer = [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ]; + * var shape = [ 2, 3 ]; + * var strides = [ 3, 1 ]; + * var offset = 0; + * + * var x = ndarray( 'generic', buffer, shape, strides, offset, 'row-major' ); + * // returns + * + * // Apply the callback function: + * ns.forEach( x, naryFunction( log, 1 ) ); + */ + forEach: typeof forEach; + /** * Returns a zero-dimensional ndarray containing a provided scalar value. * @@ -746,6 +773,44 @@ interface Namespace { */ ind2sub: typeof ind2sub; + /** + * ndarray index constructor. + * + * @param x - input ndarray + * @param options - function options + * @param options.persist - boolean indicating whether to continue persisting an index object after first usage + * @param options.kind - specifies whether a provided ndarray is a specialized kind of integer input ndarray + * @returns ndindex instance + * + * @example + * var Uint8Array = require( '@stdlib/array/uint8' ); + * var array = require( '@stdlib/ndarray/array' ); + * + * var x = array( new Uint8Array( [ 1, 0, 1, 0 ] ) ); + * + * var idx = new ns.ndindex( x ); + * // returns + * + * @example + * var Int32Array = require( '@stdlib/array/int32' ); + * var array = require( '@stdlib/ndarray/array' ); + * + * var x = array( new Int32Array( [ 1, 0, 1, 0 ] ) ); + * + * var idx = ns.ndindex.cartesianIndex( x ); + * // returns + * + * @example + * var Int32Array = require( '@stdlib/array/int32' ); + * var array = require( '@stdlib/ndarray/array' ); + * + * var x = array( new Int32Array( [ 1, 0, 1, 0 ] ) ); + * + * var idx = ns.ndindex.linearIndex( x ); + * // returns + */ + ndindex: typeof ndindex; + /** * Returns a list of ndarray index modes. * 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 9f9cdfaa3f15..f29e2223adb3 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 @@ -965,7 +965,7 @@ interface Namespace { * * @param N - number of indexed elements * @param x - input array - * @param stride - stride length + * @param strideX - stride length * @returns mid-range * * @example @@ -4547,7 +4547,7 @@ interface Namespace { * * @param N - number of indexed elements * @param x - input array - * @param stride - stride length + * @param strideX - stride length * @returns mid-range * * @example