What is the best (fastest) way to calculate the determinant of a (non symmetric, squared) LaMatGenDouble matrix with the lapack++ library?
One way to calculate the determinant is using the LU decomposition:
LaVectorLongInt pivots(A.cols());
LUFactorizeIP(A, pivots);
double detA = 1;
for (int i = 0; i < A.cols(); ++i)
detA *= A(i, i);
Warning, A will change, so making a copy is probably advised.