Prev | Next |
# include <cppad/speed/det_by_minor.hpp>
det_by_minor<Scalar> det(n)
d = det(a)
det_by_minor
is defined in the CppAD
namespace by including
the file cppad/speed/det_by_minor.hpp
(relative to the CppAD distribution directory).
det_by_minor<Scalar> det(n)
constructs the object
det
which can be used for
evaluating the determinant of
n
by
n
matrices
using expansion by minors.
Scalar
must satisfy the same conditions
as in the function det_of_minor
.
n
has prototype
size_t n
d = det(a)
returns the determinant of the matrix
A
using expansion by minors.
a
has prototype
const Vector &a
It must be a
Vector
with length @(@
n * n
@)@ and with
elements of type
Scalar
.
The elements of the @(@
n \times n
@)@ matrix @(@
A
@)@ are defined,
for @(@
i = 0 , \ldots , n-1
@)@ and @(@
j = 0 , \ldots , n-1
@)@, by
@[@
A_{i,j} = a[ i * m + j]
@]@
d
has prototype
Scalar d
It is equal to the determinant of @(@
A
@)@.
y
is a
Vector
object,
it must support the syntax
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_minor.hpp
.