Changeset 882 in Sophya for trunk/SophyaLib/TArray/matharr.h
- Timestamp:
- Apr 11, 2000, 3:50:03 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/matharr.h
r804 r882 7 7 8 8 #include "machdefs.h" 9 #include <math.h> 9 10 #include "tarray.h" 10 #include <math.h>11 11 12 12 namespace SOPHYA { … … 31 31 //////////////////////////////////////////////// 32 32 // Calcul de fonctions usuelles 33 34 #if !defined(OS_LINUX) && !defined (__KCC__) 35 // see below for g++ on Linux 36 template <class T> 37 inline TArray<T> fabs(const TArray<T>& a) 38 { MathArray<T> ma; return( ma.ApplyFunction(a, fabs) ); } 39 40 template <class T> 41 inline TArray<T> sqrt(const TArray<T>& a) 42 { MathArray<T> ma; return( ma.ApplyFunction(a, sqrt) ); } 43 33 44 template <class T> 34 45 inline TArray<T> sin(const TArray<T>& a) … … 67 78 { MathArray<T> ma; return( ma.ApplyFunction(a, log10) ); } 68 79 80 #else 81 // g++ (up to 2.95.1) doesn't handle these inline template 82 // functions correctly - with math functions defined in math.h 83 #include "gcc_arrmath_pb.h" 84 #endif 85 69 86 template <class T> 70 87 inline double MeanSigma(const TArray<T>& a, double & mean, double & sig) … … 75 92 { MathArray<T> ma; double mean, sig; return( ma.MeanSigma(a, mean, sig) ); } 76 93 77 78 94 } // Fin du namespace 79 95
Note:
See TracChangeset
for help on using the changeset viewer.