From 321f25f6d17ce6107e2140da2896e9c94a7c155c Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Sun, 1 Nov 2026 02:18:06 +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 | 450 ++++++++++++++++++ 1 file changed, 450 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 fe77181d1756..26623b1199b4 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,18 +20,98 @@ /* eslint-disable max-lines */ +import BooleanMatrix = require( '@stdlib/ndarray/matrix/bool' ); 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 Int8Matrix = require( '@stdlib/ndarray/matrix/int8' ); import Int16Matrix = require( '@stdlib/ndarray/matrix/int16' ); import Int32Matrix = require( '@stdlib/ndarray/matrix/int32' ); +import Uint8Matrix = require( '@stdlib/ndarray/matrix/uint8' ); +import Uint8ClampedMatrix = require( '@stdlib/ndarray/matrix/uint8c' ); +import Uint16Matrix = require( '@stdlib/ndarray/matrix/uint16' ); +import Uint32Matrix = require( '@stdlib/ndarray/matrix/uint32' ); /** * Interface describing the `matrix` namespace. */ interface Namespace { + /** + * Creates a boolean 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.BooleanMatrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.BooleanMatrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.BooleanMatrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.BooleanMatrix( [ [ true, false ], [ false, true ] ] ); + * // 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.BooleanMatrix( 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.BooleanMatrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + BooleanMatrix: typeof BooleanMatrix; + /** * Creates a single-precision complex floating-point matrix (i.e., a two-dimensional ndarray). * @@ -442,6 +522,80 @@ interface Namespace { */ Float64Matrix: typeof Float64Matrix; + /** + * Creates an 8-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.Int8Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Int8Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Int8Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Int8Matrix( [ [ 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.Int8Matrix( 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.Int8Matrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Int8Matrix: typeof Int8Matrix; + /** * Creates a 16-bit signed integer matrix (i.e., a two-dimensional ndarray). * @@ -589,6 +743,302 @@ interface Namespace { * // returns [ 2, 1 ] */ Int32Matrix: typeof Int32Matrix; + + /** + * Creates an 8-bit unsigned 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.Uint8Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint8Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint8Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint8Matrix( [ [ 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.Uint8Matrix( 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.Uint8Matrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Uint8Matrix: typeof Uint8Matrix; + + /** + * Creates a clamped 8-bit unsigned 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.Uint8ClampedMatrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint8ClampedMatrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint8ClampedMatrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint8ClampedMatrix( [ [ 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.Uint8ClampedMatrix( 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.Uint8ClampedMatrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Uint8ClampedMatrix: typeof Uint8ClampedMatrix; + + /** + * Creates a 16-bit unsigned 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.Uint16Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint16Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint16Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint16Matrix( [ [ 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.Uint16Matrix( 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.Uint16Matrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Uint16Matrix: typeof Uint16Matrix; + + /** + * Creates a 32-bit unsigned 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.Uint32Matrix(); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 0, 0 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint32Matrix( [ 2, 2 ] ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint32Matrix( 2, 2 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 2 ] + * + * @example + * var getShape = require( '@stdlib/ndarray/shape' ); + * + * var arr = new ns.Uint32Matrix( [ [ 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.Uint32Matrix( 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.Uint32Matrix( buf, 8, 2, 1 ); + * // returns + * + * var sh = getShape( arr ); + * // returns [ 2, 1 ] + */ + Uint32Matrix: typeof Uint32Matrix; } /**