toon-members
[Top][All Lists]
Advanced

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

[Toon-members] TooN helpers.h


From: Christopher Mei
Subject: [Toon-members] TooN helpers.h
Date: Wed, 24 Jun 2009 13:17:17 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Christopher Mei <cmei>  09/06/24 13:17:17

Modified files:
        .              : helpers.h 

Log message:
        accumulate* functions are now part of the Internal namespace.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/helpers.h?cvsroot=toon&r1=1.71&r2=1.72

Patches:
Index: helpers.h
===================================================================
RCS file: /cvsroot/toon/TooN/helpers.h,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -b -r1.71 -r1.72
--- helpers.h   24 Jun 2009 12:55:23 -0000      1.71
+++ helpers.h   24 Jun 2009 13:17:17 -0000      1.72
@@ -319,7 +319,7 @@
                return result;
        }
 
-    
+    namespace Internal {
     template<int Size, typename Precision, typename Base, const Precision& 
(*pFunc)(Precision,Precision)> inline Precision accumulate( const Vector<Size, 
Precision, Base> & v )  {
         if( v.size() == 0 ) {
             return 0; // What should we return, exception?
@@ -373,7 +373,7 @@
         }
         return result;
     }
-
+    }
     template<typename Precision> const Precision& non_const_min( Precision a, 
Precision b ) {
         return std::min( a, b );
     }
@@ -381,28 +381,28 @@
         return std::max( a, b );
     }
     template<int Size, typename Precision, typename Base> inline Precision 
min( const Vector<Size, Precision, Base> & v) {
-        return accumulate<Size,Precision,Base,non_const_min>( v );
+        return Internal::accumulate<Size,Precision,Base,non_const_min>( v );
     }
     template<int R, int C, typename Precision, typename Base> inline Precision 
min( const Matrix<R, C, Precision, Base> & m) {
-        return accumulate<R,C,Precision,Base,non_const_min>( m );
+        return Internal::accumulate<R,C,Precision,Base,non_const_min>( m );
     }
     template<int R, int C, typename Precision, typename Base> inline Vector<C, 
Precision> min_vertical( const Matrix<R, C, Precision, Base> & m) {
-        return accumulate_vertical<R,C,Precision,Base,non_const_min>( m );
+        return 
Internal::accumulate_vertical<R,C,Precision,Base,non_const_min>( m );
     }
     template<int R, int C, typename Precision, typename Base> inline Vector<R, 
Precision> min_horizontal( const Matrix<R, C, Precision, Base> & m) {
-        return accumulate_horizontal<R,C,Precision,Base,non_const_min>( m );
+        return 
Internal::accumulate_horizontal<R,C,Precision,Base,non_const_min>( m );
     }
     template<int Size, typename Precision, typename Base> inline Precision 
max( const Vector<Size, Precision, Base> & v) {
-        return accumulate<Size,Precision,Base,non_const_max>( v );
+        return Internal::accumulate<Size,Precision,Base,non_const_max>( v );
     }
     template<int R, int C, typename Precision, typename Base> inline Precision 
max( const Matrix<R, C, Precision, Base> & m) {
-        return accumulate<R,C,Precision,Base,non_const_max>( m );
+        return Internal::accumulate<R,C,Precision,Base,non_const_max>( m );
     }
     template<int R, int C, typename Precision, typename Base> inline Vector<C, 
Precision> max_vertical( const Matrix<R, C, Precision, Base> & m) {
-        return accumulate_vertical<R,C,Precision,Base,non_const_max>( m );
+        return 
Internal::accumulate_vertical<R,C,Precision,Base,non_const_max>( m );
     }
     template<int R, int C, typename Precision, typename Base> inline Vector<R, 
Precision> max_horizontal( const Matrix<R, C, Precision, Base> & m) {
-        return accumulate_horizontal<R,C,Precision,Base,non_const_max>( m );
+        return 
Internal::accumulate_horizontal<R,C,Precision,Base,non_const_max>( m );
     }
 }
 #endif




reply via email to

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