Changeset 2588 in Sophya
- Timestamp:
- Jul 30, 2004, 4:30:47 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tarray.h
r2575 r2588 174 174 inline TArray<T>& operator -= (const TArray<T>& a) { return SubElt(a, *this); } 175 175 176 // Doit-on definir les operateur *= /= TArray ? Reza, Juillet 2004 177 //! Element by element multiplication in place TArray *= TArray (element by element) 178 inline TArray<T>& Mul(const TArray<T>& a) { return MulElt(a, *this); } 179 //! Element by element division in place TArray *= TArray (element by element) 180 inline TArray<T>& Div(const TArray<T>& a) { return DivlElt(a, *this); } 181 176 182 // Recopie des valeurs, element par element 177 183 virtual TArray<T>& CopyElt(const TArray<T>& a); … … 292 298 293 299 /*! \ingroup TArray \fn operator+(const TArray<T>&,const TArray<T>&) 294 \brief Operator TArray = TArray + TArray */300 \brief Operator TArray = TArray + TArray (element by element addition) */ 295 301 template <class T> 296 302 inline TArray<T> operator + (const TArray<T>& a,const TArray<T>& b) … … 299 305 300 306 /*! \ingroup TArray \fn operator-(const TArray<T>&,const TArray<T>&) 301 \brief Operator TArray = TArray - TArray */307 \brief Operator TArray = TArray - TArray (element by element subtraction) */ 302 308 template <class T> 303 309 inline TArray<T> operator - (const TArray<T>& a,const TArray<T>& b) … … 305 311 a.SubElt(b, result); return result; } 306 312 313 /*! \ingroup TArray \fn MultiplyElt((const TArray<T>&,const TArray<T>&) 314 \brief Element by element multiplication of two arrays TArray = TArray * TArray */ 315 316 template <class T> 317 inline TArray<T> MultiplyElt(const TArray<T>& a,const TArray<T>& b) 318 { TArray<T> result; result.SetTemp(true); 319 a.MulElt(b, result); return result; } 320 321 /*! \ingroup TArray \fn DivideElt((const TArray<T>&,const TArray<T>&) 322 \brief Element by element division of two arrays TArray = TArray * TArray */ 323 template <class T> 324 inline TArray<T> DivideElt(const TArray<T>& a,const TArray<T>& b) 325 { TArray<T> result; result.SetTemp(true); 326 a.DivElt(b, result); return result; } 307 327 308 328 // --------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.