Skip to content

Commit 2a2c905

Browse files
authored
feat: update blas/ext/base TypeScript declarations
PR-URL: #12005 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent a87e8f7 commit 2a2c905

1 file changed

Lines changed: 88 additions & 0 deletions

File tree

  • lib/node_modules/@stdlib/blas/ext/base/docs/types

lib/node_modules/@stdlib/blas/ext/base/docs/types/index.d.ts

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import dcusumpw = require( '@stdlib/blas/ext/base/dcusumpw' );
4646
import ddiff = require( '@stdlib/blas/ext/base/ddiff' );
4747
import dfill = require( '@stdlib/blas/ext/base/dfill' );
4848
import dindexOf = require( '@stdlib/blas/ext/base/dindex-of' );
49+
import dindexOfColumn = require( '@stdlib/blas/ext/base/dindex-of-column' );
4950
import dindexOfRow = require( '@stdlib/blas/ext/base/dindex-of-row' );
5051
import dlastIndexOf = require( '@stdlib/blas/ext/base/dlast-index-of' );
5152
import dlinspace = require( '@stdlib/blas/ext/base/dlinspace' );
@@ -177,6 +178,7 @@ import sfill = require( '@stdlib/blas/ext/base/sfill' );
177178
import sindexOf = require( '@stdlib/blas/ext/base/sindex-of' );
178179
import sindexOfRow = require( '@stdlib/blas/ext/base/sindex-of-row' );
179180
import slastIndexOf = require( '@stdlib/blas/ext/base/slast-index-of' );
181+
import slastIndexOfRow = require( '@stdlib/blas/ext/base/slast-index-of-row' );
180182
import slinspace = require( '@stdlib/blas/ext/base/slinspace' );
181183
import snancount = require( '@stdlib/blas/ext/base/snancount' );
182184
import snansum = require( '@stdlib/blas/ext/base/snansum' );
@@ -1011,6 +1013,49 @@ interface Namespace {
10111013
*/
10121014
dindexOf: typeof dindexOf;
10131015

1016+
/**
1017+
* Returns the index of the first column in a double-precision floating-point input matrix which has the same elements as a provided search vector.
1018+
*
1019+
* ## Notes
1020+
*
1021+
* - If the function is provided an empty matrix or if the function is unable to find a matching column, the function returns `-1` (i.e., an invalid index).
1022+
* - The `workspace` array is only applicable when an input matrix is stored in row-major order. When the matrix is stored in column-major order, the workspace array is ignored.
1023+
*
1024+
* @param order - storage layout
1025+
* @param M - number of rows in `A`
1026+
* @param N - number of columns in `A`
1027+
* @param A - input matrix
1028+
* @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
1029+
* @param x - search vector
1030+
* @param strideX - stride length for `x`
1031+
* @param workspace - workspace array for tracking column match candidates
1032+
* @param strideW - stride length for `workspace`
1033+
* @returns column index
1034+
*
1035+
* @example
1036+
* var Float64Array = require( '@stdlib/array/float64' );
1037+
* var Uint8Array = require( '@stdlib/array/uint8' );
1038+
*
1039+
* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 0.0, 0.0 ] );
1040+
* var x = new Float64Array( [ 2.0, 4.0, 0.0 ] );
1041+
* var workspace = new Uint8Array( 2 );
1042+
*
1043+
* var out = ns.dindexOfColumn( 'row-major', 3, 2, A, 2, x, 1, workspace, 1 );
1044+
* // returns 1
1045+
*
1046+
* @example
1047+
* var Float64Array = require( '@stdlib/array/float64' );
1048+
* var Uint8Array = require( '@stdlib/array/uint8' );
1049+
*
1050+
* var A = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 0.0, 0.0 ] );
1051+
* var x = new Float64Array( [ 2.0, 4.0, 0.0 ] );
1052+
* var workspace = new Uint8Array( 2 );
1053+
*
1054+
* var out = ns.dindexOfColumn.ndarray( 3, 2, A, 2, 1, 0, x, 1, 0, workspace, 1, 0 );
1055+
* // returns 1
1056+
*/
1057+
dindexOfColumn: typeof dindexOfColumn;
1058+
10141059
/**
10151060
* Returns the index of the first row in a double-precision floating-point input matrix which has the same elements as a provided search vector.
10161061
*
@@ -4720,6 +4765,49 @@ interface Namespace {
47204765
*/
47214766
slastIndexOf: typeof slastIndexOf;
47224767

4768+
/**
4769+
* Returns the index of the last row in a single-precision floating-point input matrix which has the same elements as a provided search vector.
4770+
*
4771+
* ## Notes
4772+
*
4773+
* - 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).
4774+
* - 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.
4775+
*
4776+
* @param order - storage layout
4777+
* @param M - number of rows in `A`
4778+
* @param N - number of columns in `A`
4779+
* @param A - input matrix
4780+
* @param LDA - stride length for the first dimension of `A` (a.k.a., leading dimension of the matrix `A`)
4781+
* @param x - search vector
4782+
* @param strideX - stride length for `x`
4783+
* @param workspace - workspace array for tracking row match candidates
4784+
* @param strideW - stride length for `workspace`
4785+
* @returns row index
4786+
*
4787+
* @example
4788+
* var Float32Array = require( '@stdlib/array/float32' );
4789+
* var Uint8Array = require( '@stdlib/array/uint8' );
4790+
*
4791+
* var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 3.0, 4.0 ] ); // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 3.0, 4.0 ] ]
4792+
* var x = new Float32Array( [ 3.0, 4.0 ] );
4793+
* var workspace = new Uint8Array( 3 );
4794+
*
4795+
* var out = ns.slastIndexOfRow( 'row-major', 3, 2, A, 2, x, 1, workspace, 1 );
4796+
* // returns 2
4797+
*
4798+
* @example
4799+
* var Float32Array = require( '@stdlib/array/float32' );
4800+
* var Uint8Array = require( '@stdlib/array/uint8' );
4801+
*
4802+
* var A = new Float32Array( [ 1.0, 2.0, 3.0, 4.0, 3.0, 4.0 ] ); // => [ [ 1.0, 2.0 ], [ 3.0, 4.0 ], [ 3.0, 4.0 ] ]
4803+
* var x = new Float32Array( [ 3.0, 4.0 ] );
4804+
* var workspace = new Uint8Array( 3 );
4805+
*
4806+
* var out = ns.slastIndexOfRow.ndarray( 3, 2, A, 2, 1, 0, x, 1, 0, workspace, 1, 0 );
4807+
* // returns 2
4808+
*/
4809+
slastIndexOfRow: typeof slastIndexOfRow;
4810+
47234811
/**
47244812
* Fills a single-precision floating-point strided array with linearly spaced values over a specified interval.
47254813
*

0 commit comments

Comments
 (0)