Determinant of a Triangular Matrix

DESCRIPTION:
Computes the determinant (or its logarithm) of a triangular Matrix.

USAGE:
det.LowerTriangular(x, logarithm=T)
det.UpperTriangular(x, logarithm=T)
det.UnitLowerTriangular(x, logarithm=T)
det.UnitUpperTriangular(x, logarithm=T)

REQUIRED ARGUMENTS:
x:
a triangular Matrix, that is, a Matrix inheriting from class "Matrix", and from one of "LowerTriangular", "UpperTriangular", "UnitLowerTriangular", and "UnitUpperTriangular".

OPTIONAL ARGUMENTS:
logarithm:
a logical variable indicating whether or not the logarithm of the modulus of the determinant should be returned rather than the determinant itself. The default is to return the logarithm.

VALUE:
returns an object of class "det".

REFERENCES:
Golub, G., and Van Loan, C. F. (1989). Matrix Computations, 2nd edition, Johns Hopkins, Baltimore.

SEE ALSO:
det.object , det.Matrix .

EXAMPLES:
x <- Matrix( sample(-3:3, size = 9, replace = T), nrow = 3, ncol = 3)
x[row(x) > col(x)] <- 0        # construct triangular matrix
class(x) <-  Matrix.class(x)
det(x)