[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Toon-members] TooN TooN.h helpers.h internal/diagmatrix.h int...
From: |
Edward Rosten |
Subject: |
[Toon-members] TooN TooN.h helpers.h internal/diagmatrix.h int... |
Date: |
Wed, 06 May 2009 14:51:18 +0000 |
CVSROOT: /cvsroot/toon
Module name: TooN
Changes by: Edward Rosten <edrosten> 09/05/06 14:51:18
Modified files:
. : TooN.h helpers.h
internal : diagmatrix.h matrix.hh mbase.hh objects.h
vector.hh
Log message:
MSVC++ fixes from Greg Andrews <gr82882 removethis at gmail dot com>
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/TooN.h?cvsroot=toon&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/TooN/helpers.h?cvsroot=toon&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/diagmatrix.h?cvsroot=toon&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/matrix.hh?cvsroot=toon&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/mbase.hh?cvsroot=toon&r1=1.30&r2=1.31
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/objects.h?cvsroot=toon&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/vector.hh?cvsroot=toon&r1=1.47&r2=1.48
Patches:
Index: TooN.h
===================================================================
RCS file: /cvsroot/toon/TooN/TooN.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- TooN.h 29 Apr 2009 21:54:07 -0000 1.39
+++ TooN.h 6 May 2009 14:51:16 -0000 1.40
@@ -74,7 +74,7 @@
template<int Size, class Precision, class Base> struct Vector;
template<int Rows, int Cols, class Precision, class Base> struct Matrix;
template<int Size, class Precision, class Base> struct DiagonalMatrix;
- template<typename T> class Operator;
+ template<typename T> struct Operator;
static const int Dynamic = -1;
Index: helpers.h
===================================================================
RCS file: /cvsroot/toon/TooN/helpers.h,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- helpers.h 6 May 2009 10:38:28 -0000 1.63
+++ helpers.h 6 May 2009 14:51:17 -0000 1.64
@@ -35,6 +35,11 @@
#include <TooN/TooN.h>
#include <cmath>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#define M_SQRT1_2 0.70710678118654752440
+#endif
+
namespace TooN {
Index: internal/diagmatrix.h
===================================================================
RCS file: /cvsroot/toon/TooN/internal/diagmatrix.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- internal/diagmatrix.h 29 Apr 2009 22:04:32 -0000 1.3
+++ internal/diagmatrix.h 6 May 2009 14:51:17 -0000 1.4
@@ -53,7 +53,7 @@
@ingroup gLinAlg
**/
template<int Size=Dynamic, typename Precision=DefaultPrecision, typename
Base=Internal::VBase>
-class DiagonalMatrix {
+struct DiagonalMatrix {
public:
inline DiagonalMatrix() {}
inline DiagonalMatrix(int size_in) : my_vector(size_in) {}
Index: internal/matrix.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/matrix.hh,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- internal/matrix.hh 2 May 2009 17:28:27 -0000 1.34
+++ internal/matrix.hh 6 May 2009 14:51:18 -0000 1.35
@@ -31,7 +31,7 @@
namespace TooN {
template <int Rows=-1, int Cols=Rows, class Precision=DefaultPrecision, class
Layout = RowMajor>
-class Matrix : public Layout::template MLayout<Rows, Cols, Precision>
+struct Matrix : public Layout::template MLayout<Rows, Cols, Precision>
{
public:
Index: internal/mbase.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/mbase.hh,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- internal/mbase.hh 1 May 2009 09:47:16 -0000 1.30
+++ internal/mbase.hh 6 May 2009 14:51:18 -0000 1.31
@@ -36,7 +36,7 @@
// The new case is that for strides, -2 means that the stride is
// the same as num_cols/num_rows, which must be dynamically sized.
-template<int, int, class, int, int, class> class GenericMBase;
+template<int, int, class, int, int, class> struct GenericMBase;
////////////////////////////////////////////////////////////////////////////////
//Closure used to acquire strides
Index: internal/objects.h
===================================================================
RCS file: /cvsroot/toon/TooN/internal/objects.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- internal/objects.h 5 May 2009 16:26:37 -0000 1.8
+++ internal/objects.h 6 May 2009 14:51:18 -0000 1.9
@@ -144,27 +144,6 @@
};
-template<class Precision> struct Operator<Internal::Identity<Precision> >;
-
-template<class Precision> struct Operator<Internal::SizedIdentity<Precision> >
- : public Operator<Internal::Identity<Precision> > {
-
- using Operator<Internal::Identity<Precision> >::val;
- const int my_size;
-
- Operator(int s, const Precision& v=1)
- :Operator<Internal::Identity<Precision> > (v), my_size(s)
- {}
-
- int num_rows() const {return my_size;}
- int num_cols() const {return my_size;}
-
- template<class Pout, class Pmult>
Operator<Internal::SizedIdentity<Pout> > scale_me(const Pmult& m) const
- {
- return Operator<Internal::SizedIdentity<Pout> >(my_size, val*m);
- }
-};
-
template<class Pr> struct Operator<Internal::Identity<Pr> > {
typedef Pr Precision;
@@ -222,6 +201,25 @@
};
+
+template<class Precision> struct Operator<Internal::SizedIdentity<Precision> >
+ : public Operator<Internal::Identity<Precision> > {
+
+ using Operator<Internal::Identity<Precision> >::val;
+ const int my_size;
+
+ Operator(int s, const Precision& v=1)
+ :Operator<Internal::Identity<Precision> > (v), my_size(s)
+ {}
+
+ int num_rows() const {return my_size;}
+ int num_cols() const {return my_size;}
+
+ template<class Pout, class Pmult>
Operator<Internal::SizedIdentity<Pout> > scale_me(const Pmult& m) const
+ {
+ return Operator<Internal::SizedIdentity<Pout> >(my_size, val*m);
+ }
+};
////////////////////////////////////////////////////////////////////////////////
//
// Addition of scalars to vectors and matrices
Index: internal/vector.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/vector.hh,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- internal/vector.hh 2 May 2009 17:28:27 -0000 1.47
+++ internal/vector.hh 6 May 2009 14:51:18 -0000 1.48
@@ -125,7 +125,7 @@
@ingroup gLinAlg
**/
template<int Size=Dynamic, typename Precision=DefaultPrecision, typename
Base=Internal::VBase>
-class Vector : public Base::template VLayout<Size, Precision> {
+struct Vector : public Base::template VLayout<Size, Precision> {
public:
// sneaky hack: only one of these constructors will work with any given base
// class but they don't generate errors unless the user tries to use one of
them
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Toon-members] TooN TooN.h helpers.h internal/diagmatrix.h int...,
Edward Rosten <=