Changeset 2938 in Sophya for trunk/SophyaLib/TArray/tarray.h
- Timestamp:
- Apr 24, 2006, 4:25:14 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tarray.h
r2917 r2938 298 298 299 299 //////////////////////////////////////////////////////////////// 300 // Surcharge d'operateurs C = A (+,- ) B300 // Surcharge d'operateurs C = A (+,-,&&,/) B 301 301 302 302 /*! \ingroup TArray \fn operator+(const TArray<T>&,const TArray<T>&) … … 314 314 a.SubElt(b, result); return result; } 315 315 316 /*! \ingroup TArray \fn MultiplyElt((const TArray<T>&,const TArray<T>&)316 /*! \ingroup TArray \fn operator && (const TArray<T>&,const TArray<T>&) 317 317 \brief Element by element multiplication of two arrays TArray = TArray * TArray */ 318 318 319 319 template <class T> 320 inline TArray<T> MultiplyElt(const TArray<T>& a,const TArray<T>& b)320 inline TArray<T> operator && (const TArray<T>& a,const TArray<T>& b) 321 321 { TArray<T> result; result.SetTemp(true); 322 322 a.MulElt(b, result); return result; } 323 323 324 /*! \ingroup TArray \fn DivideElt((const TArray<T>&,const TArray<T>&)325 \brief Element by element division of two arrays TArray = TArray *TArray */326 template <class T> 327 inline TArray<T> DivideElt(const TArray<T>& a,const TArray<T>& b, bool divzero=false)324 /*! \ingroup TArray \fn operator / (const TArray<T>&,const TArray<T>&) 325 \brief Element by element division of two arrays TArray = TArray / TArray */ 326 template <class T> 327 inline TArray<T> operator / (const TArray<T>& a,const TArray<T>& b) 328 328 { TArray<T> result; result.SetTemp(true); 329 a.DivElt(b, result, false, divzero); return result; }329 a.DivElt(b, result, false, false); return result; } 330 330 331 331 // --------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.