Changeset 2938 in Sophya for trunk/SophyaLib/TArray/tarray.h


Ignore:
Timestamp:
Apr 24, 2006, 4:25:14 PM (19 years ago)
Author:
ansari
Message:

Ajout operateur && et / (MulElt DivElt) pour TArray (.h) et partage (Share) lors des operations Add/Mul/Sub/DivCst et Add/Mul/Sub/DivElt (.cc) - Reza 24/4/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/tarray.h

    r2917 r2938  
    298298
    299299////////////////////////////////////////////////////////////////
    300 // Surcharge d'operateurs C = A (+,-) B
     300// Surcharge d'operateurs C = A (+,-,&&,/) B
    301301
    302302/*! \ingroup TArray \fn operator+(const TArray<T>&,const TArray<T>&)
     
    314314    a.SubElt(b, result);    return result; }
    315315
    316 /*! \ingroup TArray \fn MultiplyElt((const TArray<T>&,const TArray<T>&)
     316/*! \ingroup TArray \fn operator && (const TArray<T>&,const TArray<T>&)
    317317  \brief Element by element multiplication of two arrays TArray = TArray * TArray */
    318318
    319319template <class T>
    320 inline TArray<T> MultiplyElt(const TArray<T>& a,const TArray<T>& b)
     320inline TArray<T> operator && (const TArray<T>& a,const TArray<T>& b)
    321321    { TArray<T> result; result.SetTemp(true);
    322322    a.MulElt(b, result);    return result; }
    323323
    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 */
     326template <class T>
     327inline TArray<T> operator / (const TArray<T>& a,const TArray<T>& b)
    328328    { TArray<T> result; result.SetTemp(true);
    329     a.DivElt(b, result, false, divzero);    return result; }
     329    a.DivElt(b, result, false, false);    return result; }
    330330
    331331// --------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.