Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
375 changes: 375 additions & 0 deletions lib/node_modules/@stdlib/ndarray/matrix/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ndarray>
*
* var sh = getShape( arr );
* // returns [ 0, 0 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Complex64Matrix( [ 2, 2 ] );
* // returns <ndarray>
*
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Complex64Matrix( 2, 2 );
* // returns <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* var sh = getShape( arr );
* // returns [ 0, 0 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Complex128Matrix( [ 2, 2 ] );
* // returns <ndarray>
*
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Complex128Matrix( 2, 2 );
* // returns <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* var sh = getShape( arr );
* // returns [ 2, 1 ]
*/
Complex128Matrix: typeof Complex128Matrix;

/**
* Creates a matrix (i.e., a two-dimensional ndarray).
*
Expand Down Expand Up @@ -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 <ndarray>
*
* var sh = getShape( arr );
* // returns [ 0, 0 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Float32Matrix( [ 2, 2 ] );
* // returns <ndarray>
*
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Float32Matrix( 2, 2 );
* // returns <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* var sh = getShape( arr );
* // returns [ 0, 0 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Float64Matrix( [ 2, 2 ] );
* // returns <ndarray>
*
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Float64Matrix( 2, 2 );
* // returns <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* var sh = getShape( arr );
* // returns [ 0, 0 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Int32Matrix( [ 2, 2 ] );
* // returns <ndarray>
*
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Int32Matrix( 2, 2 );
* // returns <ndarray>
*
* var sh = getShape( arr );
* // returns [ 2, 2 ]
*
* @example
* var getShape = require( '@stdlib/ndarray/shape' );
*
* var arr = new ns.Int32Matrix( [ [ 1, 2 ], [ 3, 4 ] ] );
* // returns <ndarray>
*
* 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 <ndarray>
*
* 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 <ndarray>
*
* var sh = getShape( arr );
* // returns [ 2, 1 ]
*/
Int32Matrix: typeof Int32Matrix;
}

/**
Expand Down