|
21 | 21 | /* eslint-disable max-lines */ |
22 | 22 |
|
23 | 23 | import cfill = require( '@stdlib/blas/ext/base/cfill' ); |
| 24 | +import cindexOfRow = require( '@stdlib/blas/ext/base/cindex-of-row' ); |
| 25 | +import coneTo = require( '@stdlib/blas/ext/base/cone-to' ); |
24 | 26 | import csum = require( '@stdlib/blas/ext/base/csum' ); |
25 | 27 | import csumkbn = require( '@stdlib/blas/ext/base/csumkbn' ); |
26 | 28 | import czeroTo = require( '@stdlib/blas/ext/base/czero-to' ); |
@@ -115,6 +117,7 @@ import gnansumkbn = require( '@stdlib/blas/ext/base/gnansumkbn' ); |
115 | 117 | import gnansumkbn2 = require( '@stdlib/blas/ext/base/gnansumkbn2' ); |
116 | 118 | import gnansumors = require( '@stdlib/blas/ext/base/gnansumors' ); |
117 | 119 | import gnansumpw = require( '@stdlib/blas/ext/base/gnansumpw' ); |
| 120 | +import goneTo = require( '@stdlib/blas/ext/base/gone-to' ); |
118 | 121 | import grev = require( '@stdlib/blas/ext/base/grev' ); |
119 | 122 | import gsort = require( '@stdlib/blas/ext/base/gsort' ); |
120 | 123 | import gsort2hp = require( '@stdlib/blas/ext/base/gsort2hp' ); |
@@ -176,6 +179,7 @@ import szeroTo = require( '@stdlib/blas/ext/base/szero-to' ); |
176 | 179 | import wasm = require( '@stdlib/blas/ext/base/wasm' ); |
177 | 180 | import zfill = require( '@stdlib/blas/ext/base/zfill' ); |
178 | 181 | import zindexOfRow = require( '@stdlib/blas/ext/base/zindex-of-row' ); |
| 182 | +import zoneTo = require( '@stdlib/blas/ext/base/zone-to' ); |
179 | 183 | import zsum = require( '@stdlib/blas/ext/base/zsum' ); |
180 | 184 | import zsumkbn = require( '@stdlib/blas/ext/base/zsumkbn' ); |
181 | 185 | import zzeroTo = require( '@stdlib/blas/ext/base/zzero-to' ); |
@@ -217,6 +221,75 @@ interface Namespace { |
217 | 221 | */ |
218 | 222 | cfill: typeof cfill; |
219 | 223 |
|
| 224 | + /** |
| 225 | + * Returns the index of the first row in a single-precision complex floating-point input matrix which has the same elements as a provided search vector. |
| 226 | + * |
| 227 | + * ## Notes |
| 228 | + * |
| 229 | + * - 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). |
| 230 | + * - 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. |
| 231 | + * |
| 232 | + * @param order - storage layout |
| 233 | + * @param M - number of rows in `A` |
| 234 | + * @param N - number of columns in `A` |
| 235 | + * @param A - input matrix |
| 236 | + * @param LDA - stride of the first dimension of `A` (a.k.a., leading dimension of the matrix `A`) |
| 237 | + * @param x - search vector |
| 238 | + * @param strideX - stride length for `x` |
| 239 | + * @param workspace - workspace array for tracking row match candidates |
| 240 | + * @param strideW - stride length for `workspace` |
| 241 | + * @returns row index |
| 242 | + * |
| 243 | + * @example |
| 244 | + * var Complex64Array = require( `@stdlib/array/complex64` ); |
| 245 | + * var Uint8Array = require( `@stdlib/array/uint8` ); |
| 246 | + * |
| 247 | + * var A = new Complex64Array( [ 1.0, 0.0, 2.0, 0.0, 0.0, 0.0, 3.0, 0.0, 4.0, 0.0, 0.0, 0.0 ] ); |
| 248 | + * var x = new Complex64Array( [ 2.0, 0.0, 4.0, 0.0 ] ); |
| 249 | + * var workspace = new Uint8Array( 3 ); |
| 250 | + * |
| 251 | + * var out = ns.cindexOfRow( 'column-major', 3, 2, A, 3, x, 1, workspace, 1 ); |
| 252 | + * // returns 1 |
| 253 | + * |
| 254 | + * @example |
| 255 | + * var Complex64Array = require( `@stdlib/array/complex64` ); |
| 256 | + * var Uint8Array = require( `@stdlib/array/uint8` ); |
| 257 | + * |
| 258 | + * var A = new Complex64Array( [ 1.0, 0.0, 2.0, 0.0, 0.0, 0.0, 3.0, 0.0, 4.0, 0.0, 0.0, 0.0 ] ); |
| 259 | + * var x = new Complex64Array( [ 2.0, 0.0, 4.0, 0.0 ] ); |
| 260 | + * var workspace = new Uint8Array( 3 ); |
| 261 | + * |
| 262 | + * var out = ns.cindexOfRow.ndarray( 3, 2, A, 1, 3, 0, x, 1, 0, workspace, 1, 0 ); |
| 263 | + * // returns 1 |
| 264 | + */ |
| 265 | + cindexOfRow: typeof cindexOfRow; |
| 266 | + |
| 267 | + /** |
| 268 | + * Fills a single-precision complex floating-point strided array with linearly spaced numeric elements which increment by `1` starting from one. |
| 269 | + * |
| 270 | + * @param N - number of indexed elements |
| 271 | + * @param x - input array |
| 272 | + * @param strideX - stride length |
| 273 | + * @returns input array |
| 274 | + * |
| 275 | + * @example |
| 276 | + * var Complex64Array = require( '@stdlib/array/complex64' ); |
| 277 | + * |
| 278 | + * var x = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); |
| 279 | + * |
| 280 | + * ns.coneTo( x.length, x, 1 ); |
| 281 | + * // x => <Complex64Array>[ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0, 0.0 ] |
| 282 | + * |
| 283 | + * @example |
| 284 | + * var Complex64Array = require( '@stdlib/array/complex64' ); |
| 285 | + * |
| 286 | + * var x = new Complex64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); |
| 287 | + * |
| 288 | + * ns.coneTo.ndarray( x.length, x, 1, 0 ); |
| 289 | + * // x => <Complex64Array>[ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0, 0.0 ] |
| 290 | + */ |
| 291 | + coneTo: typeof coneTo; |
| 292 | + |
220 | 293 | /** |
221 | 294 | * Computes the sum of single-precision complex floating-point strided array elements. |
222 | 295 | * |
@@ -2870,6 +2943,28 @@ interface Namespace { |
2870 | 2943 | */ |
2871 | 2944 | gnansumpw: typeof gnansumpw; |
2872 | 2945 |
|
| 2946 | + /** |
| 2947 | + * Fills a strided array with linearly spaced numeric elements which increment by `1` starting from one. |
| 2948 | + * |
| 2949 | + * @param N - number of indexed elements |
| 2950 | + * @param x - input array |
| 2951 | + * @param strideX - stride length |
| 2952 | + * @returns input array |
| 2953 | + * |
| 2954 | + * @example |
| 2955 | + * var x = [ 0.0, 0.0, 0.0, 0.0 ]; |
| 2956 | + * |
| 2957 | + * ns.goneTo( x.length, x, 1 ); |
| 2958 | + * // x => [ 1.0, 2.0, 3.0, 4.0 ] |
| 2959 | + * |
| 2960 | + * @example |
| 2961 | + * var x = [ 0.0, 0.0, 0.0, 0.0 ]; |
| 2962 | + * |
| 2963 | + * ns.goneTo.ndarray( x.length, x, 1, 0 ); |
| 2964 | + * // x => [ 1.0, 2.0, 3.0, 4.0 ] |
| 2965 | + */ |
| 2966 | + goneTo: typeof goneTo; |
| 2967 | + |
2873 | 2968 | /** |
2874 | 2969 | * Reverses a strided array in-place. |
2875 | 2970 | * |
@@ -4553,6 +4648,32 @@ interface Namespace { |
4553 | 4648 | */ |
4554 | 4649 | zindexOfRow: typeof zindexOfRow; |
4555 | 4650 |
|
| 4651 | + /** |
| 4652 | + * Fills a double-precision complex floating-point strided array with linearly spaced numeric elements which increment by `1` starting from one. |
| 4653 | + * |
| 4654 | + * @param N - number of indexed elements |
| 4655 | + * @param x - input array |
| 4656 | + * @param strideX - stride length |
| 4657 | + * @returns input array |
| 4658 | + * |
| 4659 | + * @example |
| 4660 | + * var Complex128Array = require( '@stdlib/array/complex128' ); |
| 4661 | + * |
| 4662 | + * var x = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); |
| 4663 | + * |
| 4664 | + * ns.zoneTo( x.length, x, 1 ); |
| 4665 | + * // x => <Complex128Array>[ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0, 0.0 ] |
| 4666 | + * |
| 4667 | + * @example |
| 4668 | + * var Complex128Array = require( '@stdlib/array/complex128' ); |
| 4669 | + * |
| 4670 | + * var x = new Complex128Array( [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ] ); |
| 4671 | + * |
| 4672 | + * ns.zoneTo.ndarray( x.length, x, 1, 0 ); |
| 4673 | + * // x => <Complex128Array>[ 1.0, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0, 0.0 ] |
| 4674 | + */ |
| 4675 | + zoneTo: typeof zoneTo; |
| 4676 | + |
4556 | 4677 | /** |
4557 | 4678 | * Computes the sum of double-precision complex floating-point strided array elements. |
4558 | 4679 | * |
|
0 commit comments