public static double diagProd ( DMatrix1Row T ) { double prod = 1.0 ; int N = Math . min ( T . numRows , T . numCols ) ; for ( int i = 0 ; i < N ; i ++ ) { prod *= T . unsafe_get ( i , i ) ; } return prod ; }
Computes the product of the diagonal elements . For a diagonal or triangular matrix this is the determinant .