A function for checking whether a matrix is tridiagonal. The check is used before attempting to apply the BG method for computing the permanent, since the method is only applicable to tridiagonal matrices.
Usage
is.tridiagonal(A)
Arguments
A
A matrix.
Value
A logical variable. TRUE if the A is tridiagonal, FALSE otherwise.