[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Toon-members] TooN sl.h
From: |
Gerhard Reitmayr |
Subject: |
[Toon-members] TooN sl.h |
Date: |
Wed, 13 May 2009 16:01:00 +0000 |
CVSROOT: /cvsroot/toon
Module name: TooN
Changes by: Gerhard Reitmayr <gerhard> 09/05/13 16:01:00
Modified files:
. : sl.h
Log message:
some fixes
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/sl.h?cvsroot=toon&r1=1.4&r2=1.5
Patches:
Index: sl.h
===================================================================
RCS file: /cvsroot/toon/TooN/sl.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- sl.h 27 Apr 2009 13:36:32 -0000 1.4
+++ sl.h 13 May 2009 16:01:00 -0000 1.5
@@ -69,7 +69,7 @@
/// copy constructor from a matrix, coerces matrix to be of determinant
= 1
template <int R, int C, typename P, typename A>
- SL(Matrix<R,C,P,A>& M) : my_matrix(M) { coerce(); }
+ SL(const Matrix<R,C,P,A>& M) : my_matrix(M) { coerce(); }
/// returns the represented matrix
const Matrix<N,N,Precision> & get_matrix() const { return my_matrix; }
@@ -100,7 +100,8 @@
using std::abs;
Precision det = LU<N>(my_matrix).determinant();
assert(abs(det) > 0);
- my_matrix /= det;
+ using std::pow;
+ my_matrix /= pow(det, 1.0/N);
}
/// these constants indicate which parts of the parameter vector
- [Toon-members] TooN sl.h,
Gerhard Reitmayr <=