|  | 
|  | 1 | + | 
|  | 2 | +{{alias}}( order, tr, N, r, L, D, U, U2, I, B, LDB ) | 
|  | 3 | +    Solves a system of linear equations with a tri diagonal matrix using | 
|  | 4 | +    the LU factorization computed by `dgttrf`. | 
|  | 5 | + | 
|  | 6 | +    Indexing is relative to the first index. To introduce an offset, use | 
|  | 7 | +    typed array views. | 
|  | 8 | + | 
|  | 9 | +    If `N` is equal to `0`, the function returns `B` 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 | +    tr: integer | 
|  | 18 | +        Specifies the form of the system of equations. | 
|  | 19 | + | 
|  | 20 | +    N: integer | 
|  | 21 | +        Order of the matrix `A`. | 
|  | 22 | + | 
|  | 23 | +    r: integer | 
|  | 24 | +        Number of right-hand sides, i.e., the number of columns of the | 
|  | 25 | +        matrix `B`. | 
|  | 26 | + | 
|  | 27 | +    L: Float64Array | 
|  | 28 | +        Multipliers that define the matrix `L`. | 
|  | 29 | + | 
|  | 30 | +    D: Float64Array | 
|  | 31 | +        Diagonal elements of the upper triangular matrix `U`. | 
|  | 32 | + | 
|  | 33 | +    U: Float64Array | 
|  | 34 | +        Elements of the first super-diagonal of `U`. | 
|  | 35 | + | 
|  | 36 | +    U2: Float64Array | 
|  | 37 | +        Elements of the second super-diagonal of `U`. | 
|  | 38 | + | 
|  | 39 | +    I: Int32Array | 
|  | 40 | +        Array of pivot indices. | 
|  | 41 | + | 
|  | 42 | +    B: Float64Array | 
|  | 43 | +        Right-hand side matrix `B`, overwritten by the solution | 
|  | 44 | +        matrix `X`. | 
|  | 45 | + | 
|  | 46 | +    LDB: integer | 
|  | 47 | +        Leading dimension of array `B`. | 
|  | 48 | + | 
|  | 49 | +    Returns | 
|  | 50 | +    ------- | 
|  | 51 | +    B: Float64Array | 
|  | 52 | +        Mutated input matrix. | 
|  | 53 | + | 
|  | 54 | +    Examples | 
|  | 55 | +    -------- | 
|  | 56 | +    > var L = new {{alias:@stdlib/array/float64}}( [ 0.25, 0.26666667 ] ); | 
|  | 57 | +    > var D = new {{alias:@stdlib/array/float64}}([4.0,3.75,3.73333333]); | 
|  | 58 | +    > var U = new {{alias:@stdlib/array/float64}}( [ 1.0, 0.73333333 ] ); | 
|  | 59 | +    > var U2 = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); | 
|  | 60 | +    > var B = new {{alias:@stdlib/array/float64}}( [ 7.0, 8.0, 7.0 ] ); | 
|  | 61 | +    > var I = new {{alias:@stdlib/array/int32}}( [ 0, 1, 2 ] ); | 
|  | 62 | +    > var ord = 'column-major'; | 
|  | 63 | +    > {{alias}}( ord, 1, 3, 1, L, D, U, U2, I, B, 3 ) | 
|  | 64 | +    <Float64Array>[ ~1.44, ~1.25, ~1.55 ] | 
|  | 65 | + | 
|  | 66 | +    // Using typed array views: | 
|  | 67 | +    > var L0 = new {{alias:@stdlib/array/float64}}([ 0.0, 0.25, 0.26666667 ]); | 
|  | 68 | +    > var D0 = new {{alias:@stdlib/array/float64}}([0.0,4.0,3.75,3.73333333]); | 
|  | 69 | +    > var U0 = new {{alias:@stdlib/array/float64}}([ 0.0, 1.0, 0.73333333 ]); | 
|  | 70 | +    > var U20 = new {{alias:@stdlib/array/float64}}( [ 0.0, 0.0 ] ); | 
|  | 71 | +    > var I0 = new {{alias:@stdlib/array/int32}}( [ 0, 0, 1, 2 ] ); | 
|  | 72 | +    > var B0 = new {{alias:@stdlib/array/float64}}( [ 0.0, 7.0, 8.0, 7.0 ] ); | 
|  | 73 | +    > L = new Float64Array( L0.buffer, L0.BYTES_PER_ELEMENT*1 ); | 
|  | 74 | +    > D = new Float64Array( D0.buffer, D0.BYTES_PER_ELEMENT*1 ); | 
|  | 75 | +    > U = new Float64Array( U0.buffer, U0.BYTES_PER_ELEMENT*1 ); | 
|  | 76 | +    > U2 = new Float64Array( U20.buffer, U20.BYTES_PER_ELEMENT*1 ); | 
|  | 77 | +    > I = new Int32Array( I0.buffer, I0.BYTES_PER_ELEMENT*1 ); | 
|  | 78 | +    > B = new Float64Array( B0.buffer, B0.BYTES_PER_ELEMENT*1 ); | 
|  | 79 | +    > {{alias}}( 'column-major', 1, 3, 1, L, D, U, U2, I, B, 3 ); | 
|  | 80 | +    > B0 | 
|  | 81 | +    <Float64Array>[ 0.0, ~1.44, ~1.25, ~1.55 ] | 
|  | 82 | + | 
|  | 83 | + | 
|  | 84 | +{{alias}}.ndarray(tr,N,r,L,sl,ol,D,sd,od,U,su,ou,U2,su2,ou2,I,si,oi,B,s1,s2,ob) | 
|  | 85 | +    Solves a system of linear equations with a tri diagonal matrix using the | 
|  | 86 | +    LU factorization computed by `dgttrf` and alternative indexing semantics. | 
|  | 87 | + | 
|  | 88 | +    While typed array views mandate a view offset based on the underlying | 
|  | 89 | +    buffer, the offset parameters support indexing semantics based on starting | 
|  | 90 | +    indices. | 
|  | 91 | + | 
|  | 92 | +    Parameters | 
|  | 93 | +    ---------- | 
|  | 94 | +    tr: integer | 
|  | 95 | +        Specifies the form of the system of equations. | 
|  | 96 | + | 
|  | 97 | +    N: integer | 
|  | 98 | +        Order of the matrix `A`. | 
|  | 99 | + | 
|  | 100 | +    r: integer | 
|  | 101 | +        Number of right-hand sides, i.e., the number of columns of the | 
|  | 102 | +        matrix `B`. | 
|  | 103 | + | 
|  | 104 | +    L: Float64Array | 
|  | 105 | +        Multipliers that define the matrix `L`. | 
|  | 106 | + | 
|  | 107 | +    sl: integer | 
|  | 108 | +        Stride length for `L`. | 
|  | 109 | + | 
|  | 110 | +    ol: integer | 
|  | 111 | +        Starting index for `L`. | 
|  | 112 | + | 
|  | 113 | +    D: Float64Array | 
|  | 114 | +        Diagonal elements of the upper triangular matrix `U`. | 
|  | 115 | + | 
|  | 116 | +    sd: integer | 
|  | 117 | +        Stride length for `D`. | 
|  | 118 | + | 
|  | 119 | +    od: integer | 
|  | 120 | +        Starting index for `D`. | 
|  | 121 | + | 
|  | 122 | +    U: Float64Array | 
|  | 123 | +        Elements of the first super-diagonal of `U`. | 
|  | 124 | + | 
|  | 125 | +    su: integer | 
|  | 126 | +        Stride length for `U`. | 
|  | 127 | + | 
|  | 128 | +    ou: integer | 
|  | 129 | +        Starting index for `U`. | 
|  | 130 | + | 
|  | 131 | +    U2: Float64Array | 
|  | 132 | +        Elements of the second super-diagonal of `U`. | 
|  | 133 | + | 
|  | 134 | +    su2: integer | 
|  | 135 | +        Stride length for `U2`. | 
|  | 136 | + | 
|  | 137 | +    ou2: integer | 
|  | 138 | +        Starting index for `U2`. | 
|  | 139 | + | 
|  | 140 | +    I: Int32Array | 
|  | 141 | +        Array of pivot indices. | 
|  | 142 | + | 
|  | 143 | +    si: integer | 
|  | 144 | +        Stride length for `I`. | 
|  | 145 | + | 
|  | 146 | +    oi: integer | 
|  | 147 | +        Starting index for `I`. | 
|  | 148 | + | 
|  | 149 | +    B: Float64Array | 
|  | 150 | +        Right-hand side matrix `B`, overwritten by the solution matrix `X`. | 
|  | 151 | + | 
|  | 152 | +    s1: integer | 
|  | 153 | +        Stride length for the first dimension of `B`. | 
|  | 154 | + | 
|  | 155 | +    s2: integer | 
|  | 156 | +        Stride length for the second dimension of `B`. | 
|  | 157 | + | 
|  | 158 | +    ob: integer | 
|  | 159 | +        Starting index for `B`. | 
|  | 160 | + | 
|  | 161 | +    Returns | 
|  | 162 | +    ------- | 
|  | 163 | +    B: Float64Array | 
|  | 164 | +        Mutated input matrix. | 
|  | 165 | + | 
|  | 166 | +    Examples | 
|  | 167 | +    -------- | 
|  | 168 | +    > var L = new {{alias:@stdlib/array/float64}}( [ 0.25, 0.26666667 ] ); | 
|  | 169 | +    > var D = new {{alias:@stdlib/array/float64}}([ 4.0, 3.75, 3.73333333 ]); | 
|  | 170 | +    > var U = new {{alias:@stdlib/array/float64}}( [ 1.0, 0.73333333 ] ); | 
|  | 171 | +    > var U2 = new {{alias:@stdlib/array/float64}}( [ 0.0 ] ); | 
|  | 172 | +    > var B = new {{alias:@stdlib/array/float64}}( [ 7.0, 8.0, 7.0 ] ); | 
|  | 173 | +    > var I = new {{alias:@stdlib/array/int32}}( [ 0, 1, 2 ] ); | 
|  | 174 | +    > {{alias}}.ndarray(1,3,1,L,1,0,D,1,0,U,1,0,U2,1,0,I,1,0,B,1,1,0) | 
|  | 175 | +    <Float64Array>[ ~1.44, ~1.25, ~1.55 ] | 
|  | 176 | + | 
|  | 177 | +    See Also | 
|  | 178 | +    -------- | 
0 commit comments