|
| 1 | + |
| 2 | +{{alias}}( order, N, A, LDA, k1, k2, IPIV, incx ) |
| 3 | + Performs a series of row interchanges on the matrix `A` using pivot indices |
| 4 | + stored in `IPIV`. |
| 5 | + |
| 6 | + Indexing is relative to the first index. To introduce an offset, use typed |
| 7 | + array views. |
| 8 | + |
| 9 | + If `incx` is equal to `0`, the function returns `A` unchanged. |
| 10 | + |
| 11 | + Parameters |
| 12 | + ---------- |
| 13 | + order: string |
| 14 | + Row-major (C-style) or column-major (Fortran-style) order. Must be |
| 15 | + either 'row-major' or 'column-major'. |
| 16 | + |
| 17 | + N: integer |
| 18 | + Number of columns in `A`. |
| 19 | + |
| 20 | + A: Complex128Array |
| 21 | + Input matrix. |
| 22 | + |
| 23 | + LDA: integer |
| 24 | + Stride of the first dimension of `A` (a.k.a., leading dimension of the |
| 25 | + matrix `A`). |
| 26 | + |
| 27 | + k1: integer |
| 28 | + Index of first row to interchange. |
| 29 | + |
| 30 | + k2: integer |
| 31 | + Index of last row to interchange. |
| 32 | + |
| 33 | + IPIV: Int32Array |
| 34 | + Array of pivot indices. |
| 35 | + |
| 36 | + incx: integer |
| 37 | + Increment between successive values of `IPIV`. |
| 38 | + |
| 39 | + Returns |
| 40 | + ------- |
| 41 | + A: Complex128Array |
| 42 | + Mutated input matrix. |
| 43 | + |
| 44 | + Examples |
| 45 | + -------- |
| 46 | + > var IPIV = new {{alias:@stdlib/array/int32}}( [ 1, 0 ] ); |
| 47 | + > var A = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); |
| 48 | + > var ord = 'row-major'; |
| 49 | + > {{alias}}( ord, 2, A, 2, 0, 1, IPIV, 1 ) |
| 50 | + <Complex128Array>[ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] |
| 51 | + |
| 52 | + // Using typed array views: |
| 53 | + > var IPIV0 = new {{alias:@stdlib/array/int32}}( [ 0, 1, 0 ] ); |
| 54 | + > var A0 = new {{alias:@stdlib/array/complex128}}( [ 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] ); |
| 55 | + > IPIV = new Int32Array( IPIV0.buffer, IPIV0.BYTES_PER_ELEMENT*1 ); |
| 56 | + > A = new Complex128Array( A0.buffer, A0.BYTES_PER_ELEMENT*1 ); |
| 57 | + > {{alias}}( ord, 2, A, 2, 0, 1, IPIV, 1 ); |
| 58 | + > A0 |
| 59 | + <Complex128Array>[ 0.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] |
| 60 | + |
| 61 | + |
| 62 | +{{alias}}.ndarray( N, A, sa1, sa2, oa, k1, k2, inck, IPIV, si, oi ) |
| 63 | + Performs a series of row interchanges on the matrix `A` using pivot indices |
| 64 | + stored in `IPIV` and alternative indexing semantics. |
| 65 | + |
| 66 | + While typed array views mandate a view offset based on the underlying |
| 67 | + buffer, the offset parameters support indexing semantics based on starting |
| 68 | + indices. |
| 69 | + |
| 70 | + Parameters |
| 71 | + ---------- |
| 72 | + N: integer |
| 73 | + Number of columns in `A`. |
| 74 | + |
| 75 | + A: Complex128Array |
| 76 | + Input matrix. |
| 77 | + |
| 78 | + sa1: integer |
| 79 | + Stride of the first dimension of `A`. |
| 80 | + |
| 81 | + sa2: integer |
| 82 | + Stride of the second dimension of `A`. |
| 83 | + |
| 84 | + oa: integer |
| 85 | + Index offset for `A`. |
| 86 | + |
| 87 | + k1: integer |
| 88 | + Index of first row to interchange. |
| 89 | + |
| 90 | + k2: integer |
| 91 | + Index of last row to interchange. |
| 92 | + |
| 93 | + inck: integer |
| 94 | + Direction in which to apply pivots (-1 to apply pivots in reverse order; |
| 95 | + otherwise, apply in provided order). |
| 96 | + |
| 97 | + IPIV: Int32Array |
| 98 | + Array of pivot indices. |
| 99 | + |
| 100 | + si: integer |
| 101 | + Index increment for `IPIV`. |
| 102 | + |
| 103 | + oi: integer |
| 104 | + Index offset for `IPIV`. |
| 105 | + |
| 106 | + Returns |
| 107 | + ------- |
| 108 | + A: Complex128Array |
| 109 | + Mutated input matrix. |
| 110 | + |
| 111 | + Examples |
| 112 | + -------- |
| 113 | + > var IPIV = new {{alias:@stdlib/array/int32}}( [ 2, 0, 1 ] ); |
| 114 | + > var A = new {{alias:@stdlib/array/complex128}}( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ] ); |
| 115 | + > {{alias}}.ndarray( 2, A, 2, 1, 0, 0, 2, 1, IPIV, 1, 0 ) |
| 116 | + <Complex128Array>[ 5.0, 6.0, 7.0, 8.0, 1.0, 2.0, 3.0, 4.0, 9.0, 10.0, 11.0, 12.0 ] |
| 117 | + |
| 118 | + See Also |
| 119 | + -------- |
0 commit comments