Check for Lower Triangular
is_tril(input: any[] | Mat) : boolean
param input
- Any matrix, two-dimensional and square, to test if it's lower triangular or not
returns: boolean
- True if it is lower triangular (recall lower triangular means everything above the diagonal is zero), false otherwise.
This function tests if a square 2d matrix is lower triangular or not. Simply look at the diagonal and see if theres any entry above the diagonal that is non zero. If there is, it is not lower triangular.