|   | Prev | Next | 
# include <cppad/speed/det_of_minor.hpp>
d = det_of_minor(a, m, n, r, c)
det_of_minor is defined in the CppAD
namespace by including
the file cppad/speed/det_of_minor.hpp
(relative to the CppAD distribution directory).
m
 factorial floating point operations and
about 70 lines of source code including comments).
This is not an efficient method for computing a determinant;
for example, using an LU factorization would be better.
det_of_minor
will return the determinant of @(@
A
@)@:
a
 has prototype
     const std::vector<Scalar>& a
m
 has prototype
     size_t m
n
 has prototype
     size_t n
r
 has prototype
     std::vector<size_t>& r
r
 must have value
less than or equal 
m
.
The elements of vector 
r
 are modified during the computation,
and restored to their original value before the return from
det_of_minor.
c
 has prototype
     std::vector<size_t>& c
c
 must have value
less than or equal 
m
.
The elements of vector 
c
 are modified during the computation,
and restored to their original value before the return from
det_of_minor.
d
 has prototype
     Scalar d
x
 and 
y
 are objects of type 
Scalar
and 
i
 is an object of type int,
the 
Scalar
 must support the following operations:
| Syntax | Description | Result Type | 
| Scalar x | default constructor for Scalarobject. | |
| x = i | set value of xto current value ofi | |
| x = y | set value of xto current value ofy | |
| x + y | value of xplusy | Scalar | 
| x - y | value of xminusy | Scalar | 
| x * y | value of xtimes value ofy | Scalar | 
det_of_minor.hpp.
It returns true if it succeeds and false otherwise.