diff --git a/lib/node_modules/@stdlib/blas/ext/base/ndarray/docs/types/index.d.ts b/lib/node_modules/@stdlib/blas/ext/base/ndarray/docs/types/index.d.ts index 145ad2961c3c..1ca1ec32cc79 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/ndarray/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/blas/ext/base/ndarray/docs/types/index.d.ts @@ -96,6 +96,7 @@ import dtril2triu = require( '@stdlib/blas/ext/base/ndarray/dtril2triu' ); import dtriu = require( '@stdlib/blas/ext/base/ndarray/dtriu' ); import dtriu2tril = require( '@stdlib/blas/ext/base/ndarray/dtriu2tril' ); import dunitspace = require( '@stdlib/blas/ext/base/ndarray/dunitspace' ); +import dvander = require( '@stdlib/blas/ext/base/ndarray/dvander' ); import dwxsa = require( '@stdlib/blas/ext/base/ndarray/dwxsa' ); import dxdy = require( '@stdlib/blas/ext/base/ndarray/dxdy' ); import dxmy = require( '@stdlib/blas/ext/base/ndarray/dxmy' ); @@ -118,6 +119,7 @@ import gcusumors = require( '@stdlib/blas/ext/base/ndarray/gcusumors' ); import gcusumpw = require( '@stdlib/blas/ext/base/ndarray/gcusumpw' ); import gdiff = require( '@stdlib/blas/ext/base/ndarray/gdiff' ); import gfillEqual = require( '@stdlib/blas/ext/base/ndarray/gfill-equal' ); +import gfillGreaterThanEqual = require( '@stdlib/blas/ext/base/ndarray/gfill-greater-than-equal' ); import gfillNaN = require( '@stdlib/blas/ext/base/ndarray/gfill-nan' ); import gfillNotEqual = require( '@stdlib/blas/ext/base/ndarray/gfill-not-equal' ); import gfindIndex = require( '@stdlib/blas/ext/base/ndarray/gfind-index' ); @@ -137,6 +139,8 @@ import glastIndexEqual = require( '@stdlib/blas/ext/base/ndarray/glast-index-equ import glastIndexOf = require( '@stdlib/blas/ext/base/ndarray/glast-index-of' ); import glastIndexOfFalsy = require( '@stdlib/blas/ext/base/ndarray/glast-index-of-falsy' ); import glastIndexOfTruthy = require( '@stdlib/blas/ext/base/ndarray/glast-index-of-truthy' ); +import gleftPadCircular = require( '@stdlib/blas/ext/base/ndarray/gleft-pad-circular' ); +import gleftPadEdge = require( '@stdlib/blas/ext/base/ndarray/gleft-pad-edge' ); import glinspace = require( '@stdlib/blas/ext/base/ndarray/glinspace' ); import glogspace = require( '@stdlib/blas/ext/base/ndarray/glogspace' ); import gnansum = require( '@stdlib/blas/ext/base/ndarray/gnansum' ); @@ -146,6 +150,8 @@ import gnansumors = require( '@stdlib/blas/ext/base/ndarray/gnansumors' ); import gnansumpw = require( '@stdlib/blas/ext/base/ndarray/gnansumpw' ); import gnone = require( '@stdlib/blas/ext/base/ndarray/gnone' ); import goneTo = require( '@stdlib/blas/ext/base/ndarray/gone-to' ); +import grightPadCircular = require( '@stdlib/blas/ext/base/ndarray/gright-pad-circular' ); +import grightPadEdge = require( '@stdlib/blas/ext/base/ndarray/gright-pad-edge' ); import gsome = require( '@stdlib/blas/ext/base/ndarray/gsome' ); import gsort = require( '@stdlib/blas/ext/base/ndarray/gsort' ); import gsorthp = require( '@stdlib/blas/ext/base/ndarray/gsorthp' ); @@ -159,6 +165,8 @@ import gtril2triu = require( '@stdlib/blas/ext/base/ndarray/gtril2triu' ); import gtriu = require( '@stdlib/blas/ext/base/ndarray/gtriu' ); import gtriu2tril = require( '@stdlib/blas/ext/base/ndarray/gtriu2tril' ); import gunitspace = require( '@stdlib/blas/ext/base/ndarray/gunitspace' ); +import gvander = require( '@stdlib/blas/ext/base/ndarray/gvander' ); +import gwhere = require( '@stdlib/blas/ext/base/ndarray/gwhere' ); import gwxpy = require( '@stdlib/blas/ext/base/ndarray/gwxpy' ); import gwxsa = require( '@stdlib/blas/ext/base/ndarray/gwxsa' ); import gxdy = require( '@stdlib/blas/ext/base/ndarray/gxdy' ); @@ -2560,6 +2568,42 @@ interface Namespace { */ dunitspace: typeof dunitspace; + /** + * Generates a double-precision floating-point Vandermonde matrix. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a two-dimensional output ndarray. + * - a zero-dimensional ndarray specifying the mode. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var Float64Vector = require( '@stdlib/ndarray/vector/float64' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = new Float64Vector( [ 1.0, 2.0, 3.0 ] ); + * var out = zeros( [ 3, 3 ], { + * 'dtype': 'float64' + * }); + * + * var mode = scalar2ndarray( 1, { + * 'dtype': 'float64' + * }); + * + * var v = ns.dvander( [ x, out, mode ] ); + * // returns [ [ 1.0, 1.0, 1.0 ], [ 1.0, 2.0, 4.0 ], [ 1.0, 3.0, 9.0 ] ] + * + * var bool = ( v === out ); + * // returns true + */ + dvander: typeof dvander; + /** * Subtracts a scalar constant from each element in an input one-dimensional double-precision floating-point ndarray and assigns the results to elements in a one-dimensional double-precision floating-point output ndarray. * @@ -3224,6 +3268,51 @@ interface Namespace { */ gfillEqual: typeof gfillEqual; + /** + * Replaces elements in a one-dimensional ndarray greater than or equal to a provided search element with a specified scalar constant. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a zero-dimensional ndarray containing the search element. + * - a zero-dimensional ndarray containing the scalar constant. + * - a zero-dimensional ndarray containing the starting index (inclusive). + * - a zero-dimensional ndarray containing the ending index (exclusive). + * + * - When comparing elements, the function uses the greater-than-or-equal operator `>=`. As a consequence, `NaN` values are never greater than or equal to any value, and `-0` and `+0` are considered equal. + * + * @param arrays - array-like object containing ndarrays + * @returns input ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = vector( [ 0.0, -2.0, 3.0, 0.0, 4.0, -6.0 ], 'generic' ); + * + * var searchElement = scalar2ndarray( -2.0, { + * 'dtype': 'generic' + * }); + * + * var alpha = scalar2ndarray( 5.0, { + * 'dtype': 'generic' + * }); + * + * var start = scalar2ndarray( 0, { + * 'dtype': 'generic' + * }); + * + * var end = scalar2ndarray( 2, { + * 'dtype': 'generic' + * }); + * + * var out = ns.gfillGreaterThanEqual( [ x, searchElement, alpha, start, end ] ); + * // returns [ 5.0, 5.0, 3.0, 0.0, 4.0, -6.0 ] + */ + gfillGreaterThanEqual: typeof gfillGreaterThanEqual; + /** * Replaces elements in a one-dimensional ndarray equal to `NaN` with a specified scalar constant. * @@ -3850,6 +3939,72 @@ interface Namespace { */ glastIndexOfTruthy: typeof glastIndexOfTruthy; + /** + * Prepends elements to a one-dimensional input ndarray by circularly repeating existing elements and writes the results to a one-dimensional output ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional output ndarray. Must have `N + k` elements, where `N` is the number of elements in the input ndarray, and `k` is the number of elements to pad. + * - a zero-dimensional ndarray specifying the number of elements to pad. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = vector( [ 1.0, 2.0, 3.0, 4.0 ], 'generic' ); + * var y = zeros( [ 10 ], { + * 'dtype': 'generic' + * }); + * + * var k = scalar2ndarray( 6, { + * 'dtype': 'generic' + * }); + * + * var out = ns.gleftPadCircular( [ x, y, k ] ); + * // returns [ 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 ] + */ + gleftPadCircular: typeof gleftPadCircular; + + /** + * Prepends elements to a one-dimensional input ndarray by repeating the leading edge element and writes the results to a one-dimensional output ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional output ndarray. Must have `N + k` elements, where `N` is the number of elements in the input ndarray, and `k` is the number of elements to pad. + * - a zero-dimensional ndarray specifying the number of elements to pad. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = vector( [ 1.0, 2.0, 3.0, 4.0 ], 'generic' ); + * var y = zeros( [ 10 ], { + * 'dtype': 'generic' + * }); + * + * var k = scalar2ndarray( 6, { + * 'dtype': 'generic' + * }); + * + * var out = ns.gleftPadEdge( [ x, y, k ] ); + * // returns [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 3.0, 4.0 ] + */ + gleftPadEdge: typeof gleftPadEdge; + /** * Fills a one-dimensional ndarray with linearly spaced values over a specified interval. * @@ -4088,6 +4243,72 @@ interface Namespace { */ goneTo: typeof goneTo; + /** + * Appends elements to a one-dimensional input ndarray by circularly repeating existing elements and writes the results to a one-dimensional output ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional output ndarray. Must have `N + k` elements, where `N` is the number of elements in the input ndarray, and `k` is the number of elements to pad. + * - a zero-dimensional ndarray specifying the number of elements to pad. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = vector( [ 1.0, 2.0, 3.0, 4.0 ], 'generic' ); + * var y = zeros( [ 10 ], { + * 'dtype': 'generic' + * }); + * + * var k = scalar2ndarray( 6, { + * 'dtype': 'generic' + * }); + * + * var out = ns.grightPadCircular( [ x, y, k ] ); + * // returns [ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0 ] + */ + grightPadCircular: typeof grightPadCircular; + + /** + * Appends elements to a one-dimensional input ndarray by repeating the trailing edge element and writes the results to a one-dimensional output ndarray. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a one-dimensional output ndarray. Must have `N + k` elements, where `N` is the number of elements in the input ndarray, and `k` is the number of elements to pad. + * - a zero-dimensional ndarray specifying the number of elements to pad. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * + * var x = vector( [ 1.0, 2.0, 3.0, 4.0 ], 'generic' ); + * var y = zeros( [ 10 ], { + * 'dtype': 'generic' + * }); + * + * var k = scalar2ndarray( 6, { + * 'dtype': 'generic' + * }); + * + * var out = ns.grightPadEdge( [ x, y, k ] ); + * // returns [ 1.0, 2.0, 3.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0 ] + */ + grightPadEdge: typeof grightPadEdge; + /** * Tests whether a one-dimensional ndarray contains at least `k` truthy elements. * @@ -4449,6 +4670,70 @@ interface Namespace { */ gunitspace: typeof gunitspace; + /** + * Generates a Vandermonde matrix. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional input ndarray. + * - a two-dimensional output ndarray. + * - a zero-dimensional ndarray specifying the mode. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * var zeros = require( '@stdlib/ndarray/zeros' ); + * var scalar2ndarray = require( '@stdlib/ndarray/from-scalar' ); + * + * var x = vector( [ 1.0, 2.0, 3.0 ], 'generic' ); + * var out = zeros( [ 3, 3 ], { + * 'dtype': 'generic' + * }); + * + * var mode = scalar2ndarray( 1, { + * 'dtype': 'generic' + * }); + * + * var v = ns.gvander( [ x, out, mode ] ); + * // returns [ [ 1.0, 1.0, 1.0 ], [ 1.0, 2.0, 4.0 ], [ 1.0, 3.0, 9.0 ] ] + * + * var bool = ( v === out ); + * // returns true + */ + gvander: typeof gvander; + + /** + * Takes elements from one of two one-dimensional ndarrays depending on a condition. + * + * ## Notes + * + * - The function expects the following ndarrays: + * + * - a one-dimensional condition ndarray. + * - first one-dimensional input ndarray. + * - second one-dimensional input ndarray. + * - a one-dimensional output ndarray. + * + * @param arrays - array-like object containing ndarrays + * @returns output ndarray + * + * @example + * var vector = require( '@stdlib/ndarray/vector/ctor' ); + * + * var condition = vector( [ 1, 0, 1, 0, 1 ], 'generic' ); + * var x = vector( [ 1.0, 2.0, 3.0, 4.0, 5.0 ], 'generic' ); + * var y = vector( [ 6.0, 7.0, 8.0, 9.0, 10.0 ], 'generic' ); + * var out = vector( [ 0.0, 0.0, 0.0, 0.0, 0.0 ], 'generic' ); + * + * var v = ns.gwhere( [ condition, x, y, out ] ); + * // returns [ 1.0, 7.0, 3.0, 9.0, 5.0 ] + */ + gwhere: typeof gwhere; + /** * Adds elements of a one-dimensional ndarray to the corresponding elements of a second one-dimensional ndarray and assigns the results to elements in a third one-dimensional ndarray. *