40 template<>
inline double determinant(
const arma::mat::fixed<1,2> &M)
42 return sqrt(M(0,0)*M(0,0)+M(0,1)*M(0,1));
45 template<>
inline double determinant(
const arma::mat::fixed<2,1> &M)
47 return sqrt(M(0,0)*M(0,0)+M(1,0)*M(1,0));
60 template<>
inline double determinant(
const arma::mat::fixed<1,3> &M)
62 return sqrt(M(0,0)*M(0,0)+M(0,1)*M(0,1)+M(0,2)*M(0,2));
65 template<>
inline double determinant(
const arma::mat::fixed<3,1> &M)
67 return sqrt(M(0,0)*M(0,0)+M(1,0)*M(1,0)+M(2,0)*M(2,0));
70 template<>
inline double determinant(
const arma::mat::fixed<2,3> &M)
72 return sqrt((M(0,0)*M(0,0)+M(0,1)*M(0,1)+M(0,2)*M(0,2))*(M(1,0)*M(1,0)+M(1,1)*M(1,1)+M(1,2)*M(1,2))
73 -(M(0,0)*M(1,0)+M(0,1)*M(1,1)+M(0,2)*M(1,2))*(M(0,0)*M(1,0)+M(0,1)*M(1,1)+M(0,2)*M(1,2)));
76 template<>
inline double determinant(
const arma::mat::fixed<3,2> &M)
78 return sqrt((M(0,0)*M(0,0)+M(1,0)*M(1,0)+M(2,0)*M(2,0))*(M(0,1)*M(0,1)+M(1,1)*M(1,1)+M(2,1)*M(2,1))
79 -(M(0,0)*M(0,1)+M(1,0)*M(1,1)+M(2,0)*M(2,1))*(M(0,0)*M(0,1)+M(1,0)*M(1,1)+M(2,0)*M(2,1)));
82 template<arma::uword n>
inline double determinant(
const arma::mat::fixed<n,n> &M)
double determinant(const T &M)
Calculates determinant of a rectangular matrix.