From a74845217126c4bcfd2983376d43b22ab9a0e0bf Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Sat, 27 Jun 2026 03:19:15 +0000 Subject: [PATCH] feat: update `ndarray/matrix` TypeScript declarations Signed-off-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> --- .../ndarray/matrix/docs/types/index.d.ts | 375 ++++++++++++++++++ 1 file changed, 375 insertions(+) diff --git a/lib/node_modules/@stdlib/ndarray/matrix/docs/types/index.d.ts b/lib/node_modules/@stdlib/ndarray/matrix/docs/types/index.d.ts index 51b68b25e673..81755f43b341 100644 --- a/lib/node_modules/@stdlib/ndarray/matrix/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/ndarray/matrix/docs/types/index.d.ts @@ -20,12 +20,165 @@ /* eslint-disable max-lines */ +import Complex64Matrix = require( '@stdlib/ndarray/matrix/complex64' ); +import Complex128Matrix = require( '@stdlib/ndarray/matrix/complex128' ); import matrix = require( '@stdlib/ndarray/matrix/ctor' ); +import Float32Matrix = require( '@stdlib/ndarray/matrix/float32' ); +import Float64Matrix = require( '@stdlib/ndarray/matrix/float64' ); +import Int32Matrix = require( '@stdlib/ndarray/matrix/int32' ); /** * Interface describing the `matrix` namespace. */ interface Namespace { + /** + * Creates a single-precision complex floating-point matrix (i.e., a two-dimensional ndarray). + * + * @param arg0 - shape, number of rows, array-like object, ArrayBuffer, or iterable + * @param arg1 - number of columns or integer byte offset specifying the location of the first matrix element + * @param arg2 - matrix shape or number of rows + * @param arg3 - number of columns + * @param options - function options + * @param options.readonly - boolean indicating whether to return a read-only matrix + * @param options.mode - specifies how to handle indices which exceed matrix dimensions + * @param options.submode - specifies how to handle subscripts which exceed array dimensions on a per dimension basis + * @param options.order - memory layout (either row-major or column-major) + * @returns two-dimensional ndarray + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Complex64Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Complex64Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Complex64Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Complex64Matrix( [ [ 1.0, 2.0, 3.0, 4.0 ], [ 5.0, 6.0, 7.0, 8.0 ] ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 64 ); + * var arr = new ns.Complex64Matrix( buf, 16, [ 2, 1 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 64 ); + * var arr = new ns.Complex64Matrix( buf, 16, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Complex64Matrix: typeof Complex64Matrix; + + /** + * Creates a double-precision complex floating-point matrix (i.e., a two-dimensional ndarray). + * + * @param arg0 - shape, number of rows, array-like object, ArrayBuffer, or iterable + * @param arg1 - number of columns or integer byte offset specifying the location of the first matrix element + * @param arg2 - matrix shape or number of rows + * @param arg3 - number of columns + * @param options - function options + * @param options.readonly - boolean indicating whether to return a read-only matrix + * @param options.mode - specifies how to handle indices which exceed matrix dimensions + * @param options.submode - specifies how to handle subscripts which exceed array dimensions on a per dimension basis + * @param options.order - memory layout (either row-major or column-major) + * @returns two-dimensional ndarray + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Complex128Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Complex128Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Complex128Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Complex128Matrix( [ [ 1.0, 2.0, 3.0, 4.0 ], [ 5.0, 6.0, 7.0, 8.0 ] ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 64 ); + * var arr = new ns.Complex128Matrix( buf, 16, [ 2, 1 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 64 ); + * var arr = new ns.Complex128Matrix( buf, 16, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Complex128Matrix: typeof Complex128Matrix; + /** * Creates a matrix (i.e., a two-dimensional ndarray). * @@ -139,6 +292,228 @@ interface Namespace { * // returns [ 2, 2 ] */ matrix: typeof matrix; + + /** + * Creates a single-precision floating-point matrix (i.e., a two-dimensional ndarray). + * + * @param arg0 - shape, number of rows, array-like object, ArrayBuffer, or iterable + * @param arg1 - number of columns or integer byte offset specifying the location of the first matrix element + * @param arg2 - matrix shape or number of rows + * @param arg3 - number of columns + * @param options - function options + * @param options.readonly - boolean indicating whether to return a read-only matrix + * @param options.mode - specifies how to handle indices which exceed matrix dimensions + * @param options.submode - specifies how to handle subscripts which exceed array dimensions on a per dimension basis + * @param options.order - memory layout (either row-major or column-major) + * @returns two-dimensional ndarray + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Float32Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Float32Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Float32Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Float32Matrix( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 32 ); + * var arr = new ns.Float32Matrix( buf, 8, [ 2, 1 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 32 ); + * var arr = new ns.Float32Matrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Float32Matrix: typeof Float32Matrix; + + /** + * Creates a double-precision floating-point matrix (i.e., a two-dimensional ndarray). + * + * @param arg0 - shape, number of rows, array-like object, ArrayBuffer, or iterable + * @param arg1 - number of columns or integer byte offset specifying the location of the first matrix element + * @param arg2 - matrix shape or number of rows + * @param arg3 - number of columns + * @param options - function options + * @param options.readonly - boolean indicating whether to return a read-only matrix + * @param options.mode - specifies how to handle indices which exceed matrix dimensions + * @param options.submode - specifies how to handle subscripts which exceed array dimensions on a per dimension basis + * @param options.order - memory layout (either row-major or column-major) + * @returns two-dimensional ndarray + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Float64Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Float64Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Float64Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Float64Matrix( [ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 32 ); + * var arr = new ns.Float64Matrix( buf, 8, [ 2, 1 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 32 ); + * var arr = new ns.Float64Matrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Float64Matrix: typeof Float64Matrix; + + /** + * Creates a 32-bit signed integer matrix (i.e., a two-dimensional ndarray). + * + * @param arg0 - shape, number of rows, array-like object, ArrayBuffer, or iterable + * @param arg1 - number of columns or integer byte offset specifying the location of the first matrix element + * @param arg2 - matrix shape or number of rows + * @param arg3 - number of columns + * @param options - function options + * @param options.readonly - boolean indicating whether to return a read-only matrix + * @param options.mode - specifies how to handle indices which exceed matrix dimensions + * @param options.submode - specifies how to handle subscripts which exceed array dimensions on a per dimension basis + * @param options.order - memory layout (either row-major or column-major) + * @returns two-dimensional ndarray + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Int32Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Int32Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Int32Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Int32Matrix( [ [ 1, 2 ], [ 3, 4 ] ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 32 ); + * var arr = new ns.Int32Matrix( buf, 8, [ 2, 1 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * var ArrayBuffer = require( '@stdlib/array/buffer' ); + * + * var buf = new ArrayBuffer( 32 ); + * var arr = new ns.Int32Matrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Int32Matrix: typeof Int32Matrix; } /**