diff --git a/lib/node_modules/@stdlib/blas/ext/base/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/docs/types/index.d.ts index 1805548be442..d34c8c66beb3 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/docs/types/index.d.ts @@ -26,6 +26,7 @@ import coneTo = require( '@stdlib/blas/ext/base/cone-to' ); import csum = require( '@stdlib/blas/ext/base/csum' ); import csumkbn = require( '@stdlib/blas/ext/base/csumkbn' ); import cunitspace = require( '@stdlib/blas/ext/base/cunitspace' ); +import cwhere = require( '@stdlib/blas/ext/base/cwhere' ); import czeroTo = require( '@stdlib/blas/ext/base/czero-to' ); import dapx = require( '@stdlib/blas/ext/base/dapx' ); import dapxsum = require( '@stdlib/blas/ext/base/dapxsum' ); @@ -34,6 +35,7 @@ import dapxsumkbn2 = require( '@stdlib/blas/ext/base/dapxsumkbn2' ); import dapxsumors = require( '@stdlib/blas/ext/base/dapxsumors' ); import dapxsumpw = require( '@stdlib/blas/ext/base/dapxsumpw' ); import dasumpw = require( '@stdlib/blas/ext/base/dasumpw' ); +import dcartesianPower = require( '@stdlib/blas/ext/base/dcartesian-power' ); import dcartesianSquare = require( '@stdlib/blas/ext/base/dcartesian-square' ); import dcircshift = require( '@stdlib/blas/ext/base/dcircshift' ); import dcusum = require( '@stdlib/blas/ext/base/dcusum' ); @@ -90,6 +92,7 @@ import dsumors = require( '@stdlib/blas/ext/base/dsumors' ); import dsumpw = require( '@stdlib/blas/ext/base/dsumpw' ); import dunitspace = require( '@stdlib/blas/ext/base/dunitspace' ); import dvander = require( '@stdlib/blas/ext/base/dvander' ); +import dwhere = require( '@stdlib/blas/ext/base/dwhere' ); import dzeroTo = require( '@stdlib/blas/ext/base/dzero-to' ); import gapx = require( '@stdlib/blas/ext/base/gapx' ); import gapxsum = require( '@stdlib/blas/ext/base/gapxsum' ); @@ -98,6 +101,8 @@ import gapxsumkbn2 = require( '@stdlib/blas/ext/base/gapxsumkbn2' ); import gapxsumors = require( '@stdlib/blas/ext/base/gapxsumors' ); import gapxsumpw = require( '@stdlib/blas/ext/base/gapxsumpw' ); import gasumpw = require( '@stdlib/blas/ext/base/gasumpw' ); +import gcartesianPower = require( '@stdlib/blas/ext/base/gcartesian-power' ); +import gcartesianSquare = require( '@stdlib/blas/ext/base/gcartesian-square' ); import gcircshift = require( '@stdlib/blas/ext/base/gcircshift' ); import gconjoin = require( '@stdlib/blas/ext/base/gconjoin' ); import gcusum = require( '@stdlib/blas/ext/base/gcusum' ); @@ -116,6 +121,7 @@ import gindexOfRow = require( '@stdlib/blas/ext/base/gindex-of-row' ); import gjoin = require( '@stdlib/blas/ext/base/gjoin' ); import gjoinBetween = require( '@stdlib/blas/ext/base/gjoin-between' ); import glastIndexOf = require( '@stdlib/blas/ext/base/glast-index-of' ); +import glastIndexOfRow = require( '@stdlib/blas/ext/base/glast-index-of-row' ); import glinspace = require( '@stdlib/blas/ext/base/glinspace' ); import gnancount = require( '@stdlib/blas/ext/base/gnancount' ); import gnannsumkbn = require( '@stdlib/blas/ext/base/gnannsumkbn' ); @@ -152,6 +158,7 @@ import sapxsumkbn2 = require( '@stdlib/blas/ext/base/sapxsumkbn2' ); import sapxsumors = require( '@stdlib/blas/ext/base/sapxsumors' ); import sapxsumpw = require( '@stdlib/blas/ext/base/sapxsumpw' ); import sasumpw = require( '@stdlib/blas/ext/base/sasumpw' ); +import scartesianPower = require( '@stdlib/blas/ext/base/scartesian-power' ); import scartesianSquare = require( '@stdlib/blas/ext/base/scartesian-square' ); import scircshift = require( '@stdlib/blas/ext/base/scircshift' ); import scusum = require( '@stdlib/blas/ext/base/scusum' ); @@ -203,6 +210,7 @@ import zoneTo = require( '@stdlib/blas/ext/base/zone-to' ); import zsum = require( '@stdlib/blas/ext/base/zsum' ); import zsumkbn = require( '@stdlib/blas/ext/base/zsumkbn' ); import zunitspace = require( '@stdlib/blas/ext/base/zunitspace' ); +import zwhere = require( '@stdlib/blas/ext/base/zwhere' ); import zzeroTo = require( '@stdlib/blas/ext/base/zzero-to' ); /** @@ -392,6 +400,46 @@ interface Namespace { */ cunitspace: typeof cunitspace; + /** + * Takes elements from one of two single-precision complex floating-point strided arrays depending on a condition. + * + * @param N - number of indexed elements + * @param condition - condition array + * @param strideC - stride length for `condition` + * @param x - first input array + * @param strideX - stride length for `x` + * @param y - second input array + * @param strideY - stride length for `y` + * @param out - output array + * @param strideOut - stride length for `out` + * @returns output array + * + * @example + * var BooleanArray = require( '@stdlib/array/bool' ); + * var Complex64Array = require( '@stdlib/array/complex64' ); + * + * var condition = new BooleanArray( [ true, false, true ] ); + * var x = new Complex64Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, -3.0 ] ); + * var y = new Complex64Array( [ 4.0, -4.0, 5.0, -5.0, 6.0, -6.0 ] ); + * var out = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + * + * ns.cwhere( 3, condition, 1, x, 1, y, 1, out, 1 ); + * // out => [ 1.0, -1.0, 5.0, -5.0, 3.0, -3.0 ] + * + * @example + * var BooleanArray = require( '@stdlib/array/bool' ); + * var Complex64Array = require( '@stdlib/array/complex64' ); + * + * var condition = new BooleanArray( [ true, false, true ] ); + * var x = new Complex64Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, -3.0 ] ); + * var y = new Complex64Array( [ 4.0, -4.0, 5.0, -5.0, 6.0, -6.0 ] ); + * var out = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + * + * ns.cwhere.ndarray( 3, condition, 1, 0, x, 1, 0, y, 1, 0, out, 1, 0 ); + * // out => [ 1.0, -1.0, 5.0, -5.0, 3.0, -3.0 ] + */ + cwhere: typeof cwhere; + /** * Fills a single-precision complex floating-point strided array with linearly spaced numeric elements which increment by `1` starting from zero. * @@ -606,6 +654,38 @@ interface Namespace { */ dasumpw: typeof dasumpw; + /** + * Computes the Cartesian power for a double-precision floating-point strided array. + * + * @param order - storage layout + * @param N - number of indexed elements + * @param k - power + * @param x - input array + * @param strideX - stride length for `x` + * @param out - output array + * @param LDO - stride length between successive contiguous vectors of the matrix `out` (a.k.a., leading dimension of `out`) + * @returns output array + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var x = new Float64Array( [ 1.0, 2.0 ] ); + * var out = new Float64Array( 8 ); + * + * ns.dcartesianPower( 'row-major', x.length, 2, x, 1, out, 2 ); + * // out => [ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ] + * + * @example + * var Float64Array = require( '@stdlib/array/float64' ); + * + * var x = new Float64Array( [ 1.0, 2.0 ] ); + * var out = new Float64Array( 8 ); + * + * ns.dcartesianPower.ndarray( x.length, 2, x, 1, 0, out, 2, 1, 0 ); + * // out => [ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ] + */ + dcartesianPower: typeof dcartesianPower; + /** * Computes the Cartesian square for a double-precision floating-point strided array. * @@ -2274,6 +2354,44 @@ interface Namespace { */ dvander: typeof dvander; + /** + * Takes elements from one of two double-precision floating-point strided arrays depending on a condition. + * + * @param N - number of indexed elements + * @param condition - condition array + * @param strideC - stride length for `condition` + * @param x - first input array + * @param strideX - stride length for `x` + * @param y - second input array + * @param strideY - stride length for `y` + * @param out - output array + * @param strideOut - stride length for `out` + * @returns output array + * + * @example + * var BooleanArray = require( '@stdlib/array/bool' ); + * + * var condition = new BooleanArray( [ true, false, true ] ); + * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] ); + * var y = new Float64Array( [ 4.0, 5.0, 6.0 ] ); + * var out = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + * + * ns.dwhere( 3, condition, 1, x, 1, y, 1, out, 1 ); + * // out => [ 1.0, 5.0, 3.0 ] + * + * @example + * var BooleanArray = require( '@stdlib/array/bool' ); + * + * var condition = new BooleanArray( [ true, false, true ] ); + * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] ); + * var y = new Float64Array( [ 4.0, 5.0, 6.0 ] ); + * var out = new Float64Array( [ 0.0, 0.0, 0.0 ] ); + * + * ns.dwhere.ndarray( 3, condition, 1, 0, x, 1, 0, y, 1, 0, out, 1, 0 ); + * // out => [ 1.0, 5.0, 3.0 ] + */ + dwhere: typeof dwhere; + /** * Fills a double-precision floating-point strided array with linearly spaced numeric elements which increment by `1` starting from zero. * @@ -2460,6 +2578,61 @@ interface Namespace { */ gasumpw: typeof gasumpw; + /** + * Computes the Cartesian power for a strided array. + * + * @param order - storage layout + * @param N - number of indexed elements + * @param k - power + * @param x - input array + * @param strideX - stride length for `x` + * @param out - output array + * @param LDO - stride length between successive contiguous vectors of the matrix `out` (a.k.a., leading dimension of `out`) + * @returns output array + * + * @example + * var x = [ 1.0, 2.0 ]; + * var out = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]; + * + * ns.gcartesianPower( 'row-major', x.length, 2, x, 1, out, 2 ); + * // out => [ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ] + * + * @example + * var x = [ 1.0, 2.0 ]; + * var out = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]; + * + * ns.gcartesianPower.ndarray( x.length, 2, x, 1, 0, out, 2, 1, 0 ); + * // out => [ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ] + */ + gcartesianPower: typeof gcartesianPower; + + /** + * Computes the Cartesian square for a strided array. + * + * @param order - storage layout + * @param N - number of indexed elements + * @param x - input array + * @param strideX - stride length for `x` + * @param out - output array + * @param LDO - stride length between successive contiguous vectors of the matrix `out` (a.k.a., leading dimension of `out`) + * @returns output array + * + * @example + * var x = [ 1.0, 2.0 ]; + * var out = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]; + * + * ns.gcartesianSquare( 'row-major', x.length, x, 1, out, 2 ); + * // out => [ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ] + * + * @example + * var x = [ 1.0, 2.0 ]; + * var out = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]; + * + * ns.gcartesianSquare.ndarray( x.length, x, 1, 0, out, 2, 1, 0 ); + * // out => [ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ] + */ + gcartesianSquare: typeof gcartesianSquare; + /** * Circularly shifts the elements of a strided array by a specified number of positions. * @@ -3015,6 +3188,43 @@ interface Namespace { */ glastIndexOf: typeof glastIndexOf; + /** + * Returns the index of the last row in an input matrix which has the same elements as a provided search vector. + * + * ## Notes + * + * - If the function is provided an empty matrix or if the function is unable to find a search vector, the function returns `-1` (i.e., an invalid index). + * - The `workspace` array is only applicable when an input matrix is stored in column-major order. When the matrix is stored in row-major order, the workspace array is ignored. + * + * @param order - storage layout + * @param M - number of rows in `A` + * @param N - number of columns in `A` + * @param A - input matrix + * @param LDA - stride length for the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) + * @param x - search vector + * @param strideX - stride length for `x` + * @param workspace - workspace array for tracking row match candidates + * @param strideW - stride length for `workspace` + * @returns row index + * + * @example + * var A = [ 1.0, 2.0, 3.0, 4.0, 3.0, 4.0 ]; // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 3.0, 4.0 ] ] + * var x = [ 3.0, 4.0 ]; + * var workspace = [ 0, 0, 0 ]; + * + * var out = ns.glastIndexOfRow( 'row-major', 3, 2, A, 2, x, 1, workspace, 1 ); + * // returns 2 + * + * @example + * var A = [ 1.0, 2.0, 3.0, 4.0, 3.0, 4.0 ]; // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 3.0, 4.0 ] ] + * var x = [ 3.0, 4.0 ]; + * var workspace = [ 0, 0, 0 ]; + * + * var out = ns.glastIndexOfRow.ndarray( 3, 2, A, 2, 1, 0, x, 1, 0, workspace, 1, 0 ); + * // returns 2 + */ + glastIndexOfRow: typeof glastIndexOfRow; + /** * Fills a strided array with linearly spaced values over a specified interval. * @@ -3921,6 +4131,38 @@ interface Namespace { */ sasumpw: typeof sasumpw; + /** + * Computes the Cartesian power for a single-precision floating-point strided array. + * + * @param order - storage layout + * @param N - number of indexed elements + * @param k - power + * @param x - input array + * @param strideX - stride length for `x` + * @param out - output array + * @param LDO - stride length between successive contiguous vectors of the matrix `out` (a.k.a., leading dimension of `out`) + * @returns output array + * + * @example + * var Float32Array = require( '@stdlib/array/float32' ); + * + * var x = new Float32Array( [ 1.0, 2.0 ] ); + * var out = new Float32Array( 8 ); + * + * ns.scartesianPower( 'row-major', x.length, 2, x, 1, out, 2 ); + * // out => [ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ] + * + * @example + * var Float32Array = require( '@stdlib/array/float32' ); + * + * var x = new Float32Array( [ 1.0, 2.0 ] ); + * var out = new Float32Array( 8 ); + * + * ns.scartesianPower.ndarray( x.length, 2, x, 1, 0, out, 2, 1, 0 ); + * // out => [ 1.0, 1.0, 1.0, 2.0, 2.0, 1.0, 2.0, 2.0 ] + */ + scartesianPower: typeof scartesianPower; + /** * Computes the Cartesian square for a single-precision floating-point strided array. * @@ -5231,19 +5473,15 @@ interface Namespace { * @returns input array * * @example - * var Float64Array = require( '@stdlib/array/float64' ); * var Complex128Array = require( '@stdlib/array/complex128' ); * var Complex128 = require( '@stdlib/complex/float64/ctor' ); * - * var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); - * var x = new Complex128Array( arr ); + * var x = new Complex128Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); * * var alpha = new Complex128( 10.0, 10.0 ); * * ns.zfill( x.length, alpha, x, 1 ); - * - * var y = x.get( 0 ); - * // returns [ 10.0, 10.0 ] + * // x => [ 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0 ] */ zfill: typeof zfill; @@ -5423,6 +5661,46 @@ interface Namespace { */ zunitspace: typeof zunitspace; + /** + * Takes elements from one of two double-precision complex floating-point strided arrays depending on a condition. + * + * @param N - number of indexed elements + * @param condition - condition array + * @param strideC - stride length for `condition` + * @param x - first input array + * @param strideX - stride length for `x` + * @param y - second input array + * @param strideY - stride length for `y` + * @param out - output array + * @param strideOut - stride length for `out` + * @returns output array + * + * @example + * var BooleanArray = require( '@stdlib/array/bool' ); + * var Complex128Array = require( '@stdlib/array/complex128' ); + * + * var condition = new BooleanArray( [ true, false, true ] ); + * var x = new Complex128Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, -3.0 ] ); + * var y = new Complex128Array( [ 4.0, -4.0, 5.0, -5.0, 6.0, -6.0 ] ); + * var out = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + * + * ns.zwhere( 3, condition, 1, x, 1, y, 1, out, 1 ); + * // out => [ 1.0, -1.0, 5.0, -5.0, 3.0, -3.0 ] + * + * @example + * var BooleanArray = require( '@stdlib/array/bool' ); + * var Complex128Array = require( '@stdlib/array/complex128' ); + * + * var condition = new BooleanArray( [ true, false, true ] ); + * var x = new Complex128Array( [ 1.0, -1.0, 2.0, -2.0, 3.0, -3.0 ] ); + * var y = new Complex128Array( [ 4.0, -4.0, 5.0, -5.0, 6.0, -6.0 ] ); + * var out = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); + * + * ns.zwhere.ndarray( 3, condition, 1, 0, x, 1, 0, y, 1, 0, out, 1, 0 ); + * // out => [ 1.0, -1.0, 5.0, -5.0, 3.0, -3.0 ] + */ + zwhere: typeof zwhere; + /** * Fills a double-precision complex floating-point strided array with linearly spaced numeric elements which increment by `1` starting from zero. *