toon-members
[Top][All Lists]
Advanced

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

[Toon-members] TooN/internal operators.hh vbase.hh


From: Edward Rosten
Subject: [Toon-members] TooN/internal operators.hh vbase.hh
Date: Thu, 27 Aug 2009 17:29:31 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Edward Rosten <edrosten>        09/08/27 17:29:31

Modified files:
        internal       : operators.hh vbase.hh 

Log message:
        Actually undo over-zealous cleanup. Revert wrongly committed file.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/operators.hh?cvsroot=toon&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/vbase.hh?cvsroot=toon&r1=1.38&r2=1.39

Patches:
Index: operators.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/operators.hh,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- operators.hh        27 Aug 2009 16:40:13 -0000      1.44
+++ operators.hh        27 Aug 2009 17:29:31 -0000      1.45
@@ -62,15 +62,10 @@
        template<class L, class R, int F = Field<L,R>::is> struct MultiplyType 
{ typedef TOON_TYPEOF(gettype<L>()*gettype<R>()) type;};
        template<class L, class R, int F = Field<L,R>::is> struct DivideType   
{ typedef TOON_TYPEOF(gettype<L>()/gettype<R>()) type;};
 
-       template<class L, class R> struct unable_to_add_numbers;
-       template<class L, class R> struct unable_to_multiply_numbers;
-       template<class L, class R> struct unable_to_subtract_numbers;
-       template<class L, class R> struct unable_to_divide_numbers;
-       
-       template<class L, class R> struct AddType<L, R, 0>         { typedef 
unable_to_add_numbers<L,R> type;};
-       template<class L, class R> struct SubtractType<L, R, 0>    { typedef 
unable_to_subtract_numbers<L,R> type;};
-       template<class L, class R> struct MultiplyType<L, R, 0>    { typedef 
unable_to_multiply_numbers<L,R> type;};
-       template<class L, class R> struct DivideType<L, R, 0>      { typedef 
unable_to_divide_numbers<L,R> type;};
+       template<class L, class R> struct AddType<L, R, 0>         { typedef 
void type;};
+       template<class L, class R> struct SubtractType<L, R, 0>    { typedef 
void type;};
+       template<class L, class R> struct MultiplyType<L, R, 0>    { typedef 
void type;};
+       template<class L, class R> struct DivideType<L, R, 0>      { typedef 
void type;};
 
 
        //Mini operators for passing to Pairwise, etc

Index: vbase.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/vbase.hh,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- vbase.hh    26 Aug 2009 17:11:03 -0000      1.38
+++ vbase.hh    27 Aug 2009 17:29:31 -0000      1.39
@@ -234,12 +234,20 @@
 
        typedef Vector<Size, Precision, SliceVBase<Stride> > as_slice_type;
 
+       Vector<Size, Precision, SliceVBase<Stride> > as_slice(){                
 
+               return Vector<Size, Precision, SliceVBase<Stride> >(my_data, 
size(), stride(), Slicing());         
+       }
+
+       const Vector<Size, Precision, SliceVBase<Stride> > as_slice() const {   
              
+               return Vector<Size, Precision, SliceVBase<Stride> 
>(const_cast<Precision*>(my_data), size(), stride(), Slicing());         
+       }
+
        DiagonalMatrix<Size,Precision, SliceVBase<Stride> > as_diagonal() {
                return DiagonalMatrix<Size, Precision, SliceVBase<Stride> > 
(my_data, size(), stride(), Slicing());
        }
 
        const DiagonalMatrix<Size,Precision, SliceVBase<Stride> > as_diagonal() 
const {
-               return DiagonalMatrix<Size, Precision, SliceVBase<Stride> > 
(my_data, size(), stride(), Slicing());
+               return DiagonalMatrix<Size, Precision, SliceVBase<Stride> > 
(const_cast<Precision*>(my_data), size(), stride(), Slicing());
        }
 
 };




reply via email to

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