toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] TooN wls.h


From: Gerhard Reitmayr
Subject: [Toon-members] TooN wls.h
Date: Wed, 21 Jul 2010 07:52:22 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Gerhard Reitmayr <gerhard>      10/07/21 07:52:22

Modified files:
        .              : wls.h 

Log message:
        small optimization

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/wls.h?cvsroot=toon&r1=1.23&r2=1.24

Patches:
Index: wls.h
===================================================================
RCS file: /cvsroot/toon/TooN/wls.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- wls.h       30 Apr 2010 13:41:09 -0000      1.23
+++ wls.h       21 Jul 2010 07:52:22 -0000      1.24
@@ -164,12 +164,13 @@
                                           const Matrix<N,N,Precision,B4>& 
invcov){
                const Matrix<S1,N,Precision> temp1 = J1.T() * invcov;
                const Matrix<S2,N,Precision> temp2 = J2.T() * invcov;
+               const Matrix<S1,S2,Precision> mixed = temp1 * J2;
                const int size1 = J1.num_cols();
                const int size2 = J2.num_cols();
                my_C_inv.slice(index1, index1, size1, size1) += temp1 * J1;
                my_C_inv.slice(index2, index2, size2, size2) += temp2 * J2;
-               my_C_inv.slice(index1, index2, size1, size2) += temp1 * J2;
-               my_C_inv.slice(index2, index1, size2, size1) += temp2 * J1;
+               my_C_inv.slice(index1, index2, size1, size2) += mixed;
+               my_C_inv.slice(index2, index1, size2, size1) += mixed.T();
                my_vector.slice(index1, size1) += temp1 * m;
                my_vector.slice(index2, size2) += temp2 * m;
        }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]