This is the basic C++ program of C++ armadillo library which shows how to shift particular element of column of the given matrix by some particular number. It can be carried out by the help of inbuilt function "log_det" in armadillo library.
Log determinant of square matrix A
If A is not square sized, a std::logic_error exception is thrown
form 1: store the calculated log determinant in val and sign the determinant is equal to exp(val)*sign
form 2: return the complex log determinant
if matrix A is real and the determinant is positive:
the real part of the result is the log determinant
the imaginary part is zero
if matrix A is real and the determinant is negative:
the real part of the result is the log of the absolute value of the determinant
Comments