is.tridiagonal {expperm}R Documentation

Checking a matrix is tridiagonal

Description

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.

Examples

data(A)
is.tridiagonal(A)
data(triA)
is.tridiagonal(triA)

[Package expperm version 1.6 Index]