Triangular Matrices
This pages describes the methods for working with triangular matrices.
Triangular matrices are matrices that have all entries below or above the diagonal equal to zero. The following methods are available for working with triangular matrices:
Method |
Description |
|---|---|
Check if a matrix is upper triangular |
|
Check if a matrix is lower triangular |
|
Specify a matrix as upper triangular |
|
Specify a matrix as lower triangular |
|
Make a matrix upper triangular |
|
Make a matrix lower triangular |
|
Multiply and add to a matrix with upper triangular |
|
Multiply and add to a matrix with lower triangular |
|
Solve a triangular system of equations |
Note there are two different options to work with triangular matrices: 1. Set the slap_MatrixType to either slap_UpperTri or slap_LowerTri.
For supported operations (like
slap_MatMulAdd()) this will simply ignore the entries below or above the diagonal. This is the preferred method.
Use slap_MakeUpperTri or slap_MakeLowerTri to make a matrix upper or lower triangular. This will set the entries below or above the diagonal to zero. This method works for all operations, but is slower than the first option, which ignores the entries below or above the diagonal entirely.