[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Toon-members] TooN helpers.h
From: |
Gerhard Reitmayr |
Subject: |
[Toon-members] TooN helpers.h |
Date: |
Mon, 07 Jul 2008 13:06:04 +0000 |
CVSROOT: /cvsroot/toon
Module name: TooN
Changes by: Gerhard Reitmayr <gerhard> 08/07/07 13:06:04
Modified files:
. : helpers.h
Log message:
another type combination for transformCovarianceUpper
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/helpers.h?cvsroot=toon&r1=1.24&r2=1.25
Patches:
Index: helpers.h
===================================================================
RCS file: /cvsroot/toon/TooN/helpers.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- helpers.h 30 Jun 2008 13:36:10 -0000 1.24
+++ helpers.h 7 Jul 2008 13:06:04 -0000 1.25
@@ -366,6 +366,16 @@
}
}
+ template <class F, int R, int N, class A1, class A2, class A3> inline
void transformCovarianceUpper(const FixedMatrix<R,N,A1>& A, const
FixedMatrix<N,N,A2>& B, DynamicMatrix<A3> & M)
+ {
+ assert(M.num_rows() == R && M.num_cols() == R);
+ for (int i=0; i<R; ++i) {
+ const Vector<N> ABi = B * A[i];
+ for (int j=i; j<R; ++j)
+ F::eval(M[i][j], ABi * A[j]);
+ }
+ }
+
template <class F, class A1, class M2, class M3> inline void
transformCovarianceUpper(const DynamicMatrix<A1>& A, const M2 & B, M3 & M)
{
const int R = A.num_rows();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Toon-members] TooN helpers.h,
Gerhard Reitmayr <=