![]() |
Prev | Next | link_det_minor |
extern bool link_det_minor(
size_t size ,
size_t repeat ,
bool retape ,
CppAD::vector<double> &matrix ,
CppAD::vector<double> &gradient
);
package
,
the corresponding return value for link_det_minor
should be false
.
size
is the number of rows and columns in the matrix.
repeat
is the number of different matrices
that the gradient (or determinant) is computed for.
retape
is true,
the operation sequence is considered to change for each repetition.
Thus an AD package can not use one recording of the
operation sequence to compute the gradient for all of the repetitions.
retape
is false,
the operation sequence is known to be the same for each repetition.
Thus an AD package may use one recording of the
operation sequence to compute the gradient for all of the repetitions.
matrix
is a vector with
size*
size elements.
The input value of its elements does not matter.
The output value of its elements is the last matrix that the
gradient (or determinant) is computed for.
gradient
is a vector with
size*
size elements.
The input value of its elements does not matter.
The output value of its elements is the gradient of the
determinant of
matrix
with respect to its elements.
package
is double
,
only the first element of
gradient
is used and it is actually
the determinant value (the gradient value is not computed).