# include <cppad/vector.hpp> # include <cppad/speed/det_by_minor.hpp> # include <cppad/speed/uniform_01.hpp> void compute_det_minor( size_t size , size_t repeat , CppAD::vector<double> &matrix , CppAD::vector<double> &det ) { // ----------------------------------------------------- // setup CppAD::det_by_minor<double> Det(size); size_t n = size * size; // number of independent variables // ------------------------------------------------------ while(repeat--) { // get the next matrix CppAD::uniform_01(n, matrix); // computation of the determinant det[0] = Det(matrix); } return; }