You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`A = `[[stdlib_specialmatrices(module):tridiagonal(interface)]]`(dl, dv, du [, err])`
68
68
69
-
- To construct a tridiagonal matrix of size `n x n` with constant diagonal elements `dl`, `dv`, and `du`:
69
+
- To construct a tridiagonal matrix of size `n x n` with scalar diagonal elements `dl` (lower diagonal), `dv` (main diagonal), and `du` (upper diagonal):
70
70
71
-
`A = `[[stdlib_specialmatrices(module):tridiagonal(interface)]]`(dl, dv, du, n)`
71
+
`A = `[[stdlib_specialmatrices(module):tridiagonal(interface)]]`(dl, dv, du, n [, err])`
72
+
73
+
#### Arguments
74
+
75
+
##### Constructing from arrays
76
+
77
+
`A = tridiagonal(dl, dv, du [, err])`
78
+
79
+
-`dl`: Shall be a rank-1 array of type `real` or `complex` with the same kind as the resulting matrix. It is an `intent(in)` argument.
80
+
-`dv`: Shall be a rank-1 array of type `real` or `complex` with the same kind as the resulting matrix. It is an `intent(in)` argument.
81
+
-`du`: Shall be a rank-1 array of type `real` or `complex` with the same kind as the resulting matrix. It is an `intent(in)` argument.
82
+
-`err` (optional): Shall be a `type(linalg_state_type)` variable. It is an `intent(out)` argument.
83
+
If the input arrays are not of compatible sizes, the routine calls `linalg_error_handling`.
84
+
If `err` is present, it is assigned `LINALG_VALUE_ERROR`.
85
+
If `err` is not present, the program terminates via `error stop`.
86
+
In either case, the elements of the resulting matrix `A` are unassigned.
87
+
88
+
##### Constructing from constant diagonal values
89
+
90
+
`A = tridiagonal(dl, dv, du, n [, err])`
91
+
92
+
-`dl`: Shall be a scalar of type `real` or `complex` with the same kind as the resulting matrix. It is an `intent(in)` argument.
93
+
-`dv`: Shall be a scalar of type `real` or `complex` with the same kind as the resulting matrix. It is an `intent(in)` argument.
94
+
-`du`: Shall be a scalar of type `real` or `complex` with the same kind as the resulting matrix. It is an `intent(in)` argument.
95
+
-`n`: Shall be a positive `integer`. It is an `intent(in)` argument.
96
+
-`err` (optional): Shall be a `type(linalg_state_type)` variable. It is an `intent(out)` argument.
97
+
If a non-positive matrix size is provided, the routine calls `linalg_error_handling`.
98
+
If `err` is present, it is assigned `LINALG_VALUE_ERROR`.
99
+
If `err` is not present, the program terminates via `error stop`.
100
+
In either case, the elements of the resulting matrix `A` are unassigned.
Below is a list of all the specialized drivers for linear algebra tasks currently provided by the `stdlib_specialmatrices` module.
@@ -90,7 +199,7 @@ Experimental
90
199
91
200
With the exception of `extended precision` and `quadruple precision`, all the types provided by `stdlib_specialmatrices` benefit from specialized kernels for matrix-vector products accessible via the common `spmv` interface.
92
201
93
-
- For `tridiagonal` matrices, the backend is either LAPACK `lagtm` or the generalized routine `glagtm`, depending on the values and types of `alpha` and `beta`.
202
+
- For `tridiagonal`and `symmetric tridiagonal`matrices, the backend is either LAPACK `lagtm` or the generalized routine `glagtm`, depending on the values and types of `alpha` and `beta`.
94
203
95
204
#### Syntax
96
205
@@ -115,6 +224,9 @@ With the exception of `extended precision` and `quadruple precision`, all the ty
0 commit comments