toon-members
[Top][All Lists]
Advanced

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

[Toon-members] TooN SymEigen.h internal/config.hh


From: Damian Eads
Subject: [Toon-members] TooN SymEigen.h internal/config.hh
Date: Wed, 26 Aug 2009 07:49:20 +0000

CVSROOT:        /sources/toon
Module name:    TooN
Changes by:     Damian Eads <eads>      09/08/26 07:49:20

Modified files:
        .              : SymEigen.h 
        internal       : config.hh 

Log message:
        Added constructor to SymEigen(int) for dynamically sized matrices 
without immediately decomposing after initialization. This is analogous to 
SymEigen() for statically sized matrices. Put Internal:: in front of 
symeigen_condition_no to fix symbol not found error.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/SymEigen.h?cvsroot=toon&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/config.hh?cvsroot=toon&r1=1.13&r2=1.14

Patches:
Index: SymEigen.h
===================================================================
RCS file: /sources/toon/TooN/SymEigen.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- SymEigen.h  24 Aug 2009 13:02:05 -0000      1.18
+++ SymEigen.h  26 Aug 2009 07:49:20 -0000      1.19
@@ -150,6 +150,13 @@
 class SymEigen {
 public:
        inline SymEigen(){}
+
+        /// Initialise this eigen decomposition but do no immediately
+        /// perform a decomposition.
+        ///
+        /// @param m The size of the matrix to perform the eigen decomposition 
on.
+        inline SymEigen(int m) : my_evectors(m,m), my_evalues(m) {}
+
        /// Construct the eigen decomposition of a matrix. This initialises the 
class, and
        /// performs the decomposition immediately.
        template<int R, int C, typename B>
@@ -171,7 +178,7 @@
        /// See the SVD detailed description for a description of condition 
variables.
        template <int S, typename P, typename B>
        Vector<Size, Precision> backsub(const Vector<S,P,B>& rhs) const {
-               return (my_evectors.T() * 
diagmult(get_inv_diag(symeigen_condition_no),(my_evectors * rhs)));
+               return (my_evectors.T() * 
diagmult(get_inv_diag(Internal::symeigen_condition_no),(my_evectors * rhs)));
        }
 
        /// Calculate result of multiplying the (pseudo-)inverse of M by 
another matrix. 
@@ -180,7 +187,7 @@
        /// See the SVD detailed description for a description of condition 
variables.
        template <int R, int C, typename P, typename B>
        Matrix<Size,C, Precision> backsub(const Matrix<R,C,P,B>& rhs) const {
-               return (my_evectors.T() * 
diagmult(get_inv_diag(symeigen_condition_no),(my_evectors * rhs)));
+               return (my_evectors.T() * 
diagmult(get_inv_diag(Internal::symeigen_condition_no),(my_evectors * rhs)));
        }
 
        /// Calculate (pseudo-)inverse of the matrix. This is not usually 
needed: 
@@ -188,7 +195,7 @@
        /// one of the backsub() functions, which will be faster.
        /// See the SVD detailed description for a description of the 
pseudo-inverse 
        /// and condition variables.
-       Matrix<Size, Size, Precision> get_pinv(const double 
condition=symeigen_condition_no) const {
+       Matrix<Size, Size, Precision> get_pinv(const double 
condition=Internal::symeigen_condition_no) const {
                return my_evectors.T() * 
diagmult(get_inv_diag(condition),my_evectors);
        }
 

Index: internal/config.hh
===================================================================
RCS file: /sources/toon/TooN/internal/config.hh,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- internal/config.hh  24 Aug 2009 13:00:15 -0000      1.13
+++ internal/config.hh  26 Aug 2009 07:49:20 -0000      1.14
@@ -0,0 +1,14 @@
+/* internal/config.hh.  Generated from config.hh.in by configure.  */
+/* #undef TOON_TYPEOF_DECLTYPE */
+
+/* #undef TOON_TYPEOF_TYPEOF */
+
+#define TOON_TYPEOF___TYPEOF__ 1
+
+/* #undef TOON_TYPEOF_BOOST */
+
+/* #undef TOON_TYPEOF_BUILTIN */
+
+#define TOON_DEPRECATED_GCC 1
+
+#define TOON_USE_LAPACK 1




reply via email to

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