![]() |
Prev | Next |
# include <cppad/speed/det_by_lu.hpp>
det_by_lu<
Scalar>
det(
n)
d =
det(
matrix)
det_by_lu
is defined in the CppAD
namespace by including
the file cppad/speed/det_by_lu.hpp
(relative to the CppAD distribution directory).
It is only intended for example and testing purposes,
so it is not automatically included by
cppad.hpp
.
det_by_lu<
Scalar>
det(
n)
constructs the object det which can be used for
evaluating the determinant of n by n matrices
using LU factorization.
size_t
n
d =
det(
matrix)
returns the determinant of matrix using LU factorization.
The argument matrix has prototype
const
Vector &
matrix
It must be a Vector with length
n * n
and with
elements of type Scalar.
The return value d has prototype
Scalar
d
y[
i]
where i has type size_t
with value less than
n * n
.
This must return a Scalar value corresponding to the i-th
element of the vector y.
This is the only requirement of the type Vector.
det_by_lu.hpp
.
It returns true if it succeeds and false otherwise.