toon-members
[Top][All Lists]
Advanced

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

[Toon-members] TooN helpers.h se2.h se3.h sl.h so3.h wls.h tes...


From: Gerhard Reitmayr
Subject: [Toon-members] TooN helpers.h se2.h se3.h sl.h so3.h wls.h tes...
Date: Mon, 27 Apr 2009 13:36:33 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Gerhard Reitmayr <gerhard>      09/04/27 13:36:33

Modified files:
        .              : helpers.h se2.h se3.h sl.h so3.h wls.h 
        test           : SXX_test.cc 

Log message:
        updated TooN code for new Zeros name

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/helpers.h?cvsroot=toon&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/TooN/se2.h?cvsroot=toon&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/TooN/se3.h?cvsroot=toon&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/TooN/sl.h?cvsroot=toon&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/TooN/so3.h?cvsroot=toon&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/TooN/wls.h?cvsroot=toon&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/TooN/test/SXX_test.cc?cvsroot=toon&r1=1.7&r2=1.8

Patches:
Index: helpers.h
===================================================================
RCS file: /cvsroot/toon/TooN/helpers.h,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- helpers.h   27 Apr 2009 10:56:18 -0000      1.58
+++ helpers.h   27 Apr 2009 13:36:32 -0000      1.59
@@ -146,7 +146,7 @@
                template <int R, int C, typename P, typename B>
                inline Matrix<R, C, P> exp_taylor( const Matrix<R,C,P,B> & m ){
                        SizeMismatch<R, C>::test(m.num_rows(), m.num_cols());
-                       Matrix<R,C,P> result = TooN::Zero(m.num_rows(), 
m.num_cols());
+                       Matrix<R,C,P> result = TooN::Zeros(m.num_rows(), 
m.num_cols());
                        Matrix<R,C,P> f = TooN::Identity(m.num_rows());
                        P k = 1;
                        while(norm_inf((result+f)-result) > 0){

Index: se2.h
===================================================================
RCS file: /cvsroot/toon/TooN/se2.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- se2.h       14 Apr 2009 12:42:35 -0000      1.5
+++ se2.h       27 Apr 2009 13:36:32 -0000      1.6
@@ -41,7 +41,7 @@
 template <typename Precision = double>
 class SE2 {
 public:
-       SE2() : my_translation(Zero) {}
+       SE2() : my_translation(Zeros) {}
        template <class A> SE2(const SO2<Precision>& R, const 
Vector<2,Precision,A>& T) : my_rotation(R), my_translation(T) {}
        template <int S, class P, class A> SE2(const Vector<S, P, A> & v) { 
*this = exp(v); }
 
@@ -67,7 +67,7 @@
        }
 
        static inline Matrix<3,3, Precision> generator(int i) {
-               Matrix<3,3,Precision> result(Zero);
+               Matrix<3,3,Precision> result(Zeros);
                if(i < 2){
                        result[i][2] = 1;
                        return result;

Index: se3.h
===================================================================
RCS file: /cvsroot/toon/TooN/se3.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- se3.h       16 Apr 2009 15:43:46 -0000      1.23
+++ se3.h       27 Apr 2009 13:36:32 -0000      1.24
@@ -50,7 +50,7 @@
 class SE3 {
 public:
        /// Default constructor. Initialises the the rotation to zero (the 
identity) and the translation to zero
-       inline SE3() : my_translation(Zero) {}
+       inline SE3() : my_translation(Zeros) {}
 
        template <int S, typename P, typename A> 
        SE3(const SO3<Precision> & R, const Vector<S, P, A>& T) : 
my_rotation(R), my_translation(T) {}
@@ -104,7 +104,7 @@
        }
 
        static inline Matrix<4,4,Precision> generator(int i){
-               Matrix<4,4,Precision> result(Zero);
+               Matrix<4,4,Precision> result(Zeros);
                if(i < 3){
                        result[i][3]=1;
                        return result;
@@ -118,7 +118,7 @@
   template<typename Base>
   inline static Vector<4,Precision> generator_field(int i, const Vector<4, 
Precision, Base>& pos)
   {
-    Vector<4, Precision> result(Zero);
+    Vector<4, Precision> result(Zeros);
     if(i < 3){
       result[i]=pos[3];
       return result;

Index: sl.h
===================================================================
RCS file: /cvsroot/toon/TooN/sl.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- sl.h        14 Apr 2009 09:11:14 -0000      1.3
+++ sl.h        27 Apr 2009 13:36:32 -0000      1.4
@@ -120,7 +120,7 @@
 template <int S, typename P, typename B>
 inline SL<N, Precision> SL<N, Precision>::exp( const Vector<S,P,B> & v){
        SizeMismatch<S,dim>::test(v.size(), dim);
-       Matrix<N,N,Precision> t = Zero;
+       Matrix<N,N,Precision> t(Zeros);
        for(int i = 0; i < dim; ++i)
                t += generator(i) * v[i];
        SL<N, Precision> result;
@@ -131,7 +131,7 @@
 template <int N, typename Precision>
 inline Matrix<N,N,Precision> SL<N, Precision>::generator(int i){
        assert( i > -1 && i < dim );
-       Matrix<N,N,Precision> result = Zero;
+       Matrix<N,N,Precision> result(Zeros);
        if(i < DIAG_LIMIT) {                            // first ones are the 
diagonal ones
                result(i,i) = 1;
                result(i+1,i+1) = -1;

Index: so3.h
===================================================================
RCS file: /cvsroot/toon/TooN/so3.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- so3.h       16 Apr 2009 15:43:46 -0000      1.33
+++ so3.h       27 Apr 2009 13:36:33 -0000      1.34
@@ -111,7 +111,7 @@
        /// \f$3\times3\f$ matrices representing the three possible (linearised)
        /// rotations.
        inline static Matrix<3,3, Precision> generator(int i){
-               Matrix<3,3,Precision> result(Zero);
+               Matrix<3,3,Precision> result(Zeros);
                result[(i+1)%3][(i+2)%3] = -1;
                result[(i+2)%3][(i+1)%3] = 1;
                return result;

Index: wls.h
===================================================================
RCS file: /cvsroot/toon/TooN/wls.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- wls.h       20 Apr 2009 21:14:59 -0000      1.16
+++ wls.h       27 Apr 2009 13:36:33 -0000      1.17
@@ -62,8 +62,8 @@
        /// Equates to a prior that says all the parameters are zero with 
\f$\sigma^2 = \frac{1}{\text{val}}\f$.
        /// @param prior The strength of the prior
        void clear(){
-               my_C_inv = Zero;
-               my_vector = Zero;
+               my_C_inv = Zeros;
+               my_vector = Zeros;
        }
 
        /// Applies a constant regularisation term. 

Index: test/SXX_test.cc
===================================================================
RCS file: /cvsroot/toon/TooN/test/SXX_test.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- test/SXX_test.cc    7 Apr 2009 07:54:49 -0000       1.7
+++ test/SXX_test.cc    27 Apr 2009 13:36:33 -0000      1.8
@@ -39,7 +39,7 @@
     cout << "right and left multiply with matrix\n" << l << "\n";
     cout << r * l << endl;
     cout << l * r << endl;
-    TooN::Matrix<2,3> l2(TooN::Zero);
+    TooN::Matrix<2,3> l2(TooN::Zeros);
     l2[0] = TooN::makeVector(0,1,2);
     cout << "right with rectangular matrix\n";
     cout << r * l2 << endl;
@@ -145,7 +145,7 @@
     cout << "right and left multiply with matrix\n" << l << "\n";
     cout << r * l << endl;
     cout << l * r << endl;
-    TooN::Matrix<3,6> l2(TooN::Zero);
+    TooN::Matrix<3,6> l2(TooN::Zeros);
     l2[0] = TooN::makeVector(0,1,2,3,4,5);
     cout << "right with rectangular matrix\n";
     cout << r * l2 << endl;
@@ -207,7 +207,7 @@
     cout << "right and left multiply with matrix\n" << l << "\n";
     cout << r * l << endl;
     cout << l * r << endl;
-    TooN::Matrix<4,6> l2(TooN::Zero);
+    TooN::Matrix<4,6> l2(TooN::Zeros);
     l2[0] = TooN::makeVector(0,1,2,3,4,5);
     cout << "right with rectangular matrix\n";
     cout << r * l2 << endl;




reply via email to

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