*** empty log message ***

This commit is contained in:
jiri
2005-02-06 14:01:27 +00:00
parent 1b602fe7a2
commit ac8afe89ad
8 changed files with 146 additions and 22 deletions

View File

@@ -4,6 +4,7 @@
#include "vec.h"
#include "smat.h"
#include "mat.h"
#include "la_traits.h"
//MISC
@@ -104,4 +105,18 @@ const NRMat<T> inverse(NRMat<T> a, T *det=0)
return result;
}
//general determinant
template<class MAT>
const typename NRMat_traits<MAT>::elementtype determinant(MAT a)//again passed by value
{
typename NRMat_traits<MAT>::elementtype det;
if(a.nrows()!=a.ncols()) laerror("determinant of non-square matrix");
linear_solve(a,NULL,&det);
return det;
}
//auxiliary routine to adjust eigenvectors to guarantee real logarithm
extern void adjustphases(NRMat<double> &v);
#endif