Return the determinant (or log-determinant) of triangular matrices.
Usage
diagDet(x, logarithm=TRUE, ...)
Arguments
x
a numeric vector representing the diagonal of a triangular or
a diagonal matrix.
logarithm
logical.
When TRUE, the default, the logarithm of the
determinant is returned.
When FALSE, the determinant of
x is returned.
...
further arguments passed to or from other methods.
Value
An object of class det as a list with two elements
modulus
{a numeric value. The modulus (absolute value) of
the determinant or the logarithm of the modulus. The value
of the logarithm argument is included as an
attribute.}
signa numeric value, which is $\pm 1$
according to whether the determinant is positive or negative.
Details
The determinant of a triangular matrix can be calculated from its
diagonal elements only.