|
| 1 | + |
| 2 | +{{alias}}( order, norm, M, N, A, LDA, work ) |
| 3 | + Computes the value of the one norm, or the frobenius norm, or the infinity |
| 4 | + norm, or the element with the largest absolute value of a real matrix `A`. |
| 5 | + |
| 6 | + Indexing is relative to the first index. To introduce an offset, use typed |
| 7 | + array views. |
| 8 | + |
| 9 | + Parameters |
| 10 | + ---------- |
| 11 | + order: string |
| 12 | + Row-major (C-style) or column-major (Fortran-style) order. Must be |
| 13 | + either 'row-major' or 'column-major'. |
| 14 | + |
| 15 | + norm: string |
| 16 | + Specifies the type of norm to be calculated, should be one of the |
| 17 | + following: `max`, `one`, `frobenius` or `infinity`. |
| 18 | + |
| 19 | + M: integer |
| 20 | + Number of rows in `A`. |
| 21 | + |
| 22 | + N: integer |
| 23 | + Number of columns in `A`. |
| 24 | + |
| 25 | + A: Float64Array |
| 26 | + Input matrix `A`. |
| 27 | + |
| 28 | + LDA: integer |
| 29 | + Stride of the first dimension of `A` (a.k.a., leading dimension of the |
| 30 | + matrix `A`). |
| 31 | + |
| 32 | + work: Float64Array |
| 33 | + Work array used to compute the infinity norm, should have `M` indexed |
| 34 | + elements if computing the infinity norm otherwise pass a dummy array. |
| 35 | + |
| 36 | + Returns |
| 37 | + ------- |
| 38 | + Required norm: number |
| 39 | + Value of the required norm. |
| 40 | + |
| 41 | + Examples |
| 42 | + -------- |
| 43 | + > var A = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); |
| 44 | + > var work = new {{alias:@stdlib/array/float64}}( 1 ); |
| 45 | + > var order = 'row-major'; |
| 46 | + > var norm = 'max'; |
| 47 | + > {{alias}}( order, norm, 2, 2, A, 2, work ) |
| 48 | + 4.0 |
| 49 | + |
| 50 | + |
| 51 | +{{alias}}.ndarray( norm, M, N, A, sa1, sa2, oa, work, sw, ow ) |
| 52 | + Computes the value of the one norm, or the frobenius norm, or the infinity |
| 53 | + norm, or the element with the largest absolute value of a real matrix `A` |
| 54 | + using alternative indexing semantics. |
| 55 | + |
| 56 | + While typed array views mandate a view offset based on the underlying |
| 57 | + buffer, the offset parameters support indexing semantics based on starting |
| 58 | + indices. |
| 59 | + |
| 60 | + Parameters |
| 61 | + ---------- |
| 62 | + norm: string |
| 63 | + Specifies the type of norm to be calculated, should be one of the |
| 64 | + following: `max`, `one`, `frobenius` or `infinity`. |
| 65 | + |
| 66 | + M: integer |
| 67 | + Number of rows in `A`. |
| 68 | + |
| 69 | + N: integer |
| 70 | + Number of columns in `A`. |
| 71 | + |
| 72 | + A: Float64Array |
| 73 | + Input matrix `A`. |
| 74 | + |
| 75 | + sa1: integer |
| 76 | + Stride of the first dimension of `A`. |
| 77 | + |
| 78 | + sa2: integer |
| 79 | + Stride of the second dimension of `A`. |
| 80 | + |
| 81 | + oa: integer |
| 82 | + Starting index for `A`. |
| 83 | + |
| 84 | + work: Float64Array |
| 85 | + Work array used to compute the infinity norm, should have `M` indexed |
| 86 | + elements if computing the infinity norm otherwise pass a dummy array. |
| 87 | + |
| 88 | + sw: integer |
| 89 | + Stride length for `work`. |
| 90 | + |
| 91 | + ow: integer |
| 92 | + Starting index for `work`. |
| 93 | + |
| 94 | + Returns |
| 95 | + ------- |
| 96 | + Required norm: number |
| 97 | + Value of the required norm. |
| 98 | + |
| 99 | + Examples |
| 100 | + -------- |
| 101 | + > var A = new {{alias:@stdlib/array/float64}}( [ 1.0, 2.0, 3.0, 4.0 ] ); |
| 102 | + > var work = new {{alias:@stdlib/array/float64}}( 1 ); |
| 103 | + > var norm = 'max'; |
| 104 | + > {{alias}}.ndarray( norm, 2, 2, A, 2, 1, 0, work, 1, 0 ) |
| 105 | + 4.0 |
| 106 | + |
| 107 | + See Also |
| 108 | + -------- |
0 commit comments