Changeset 958 in Sophya for trunk/SophyaLib/TArray/tarray.h
- Timestamp:
- Apr 18, 2000, 3:38:53 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tarray.h
r956 r958 165 165 // Surcharge d'operateurs A (+,-,*,/) (T) x 166 166 167 //! Operator TArray = TArray + constant 167 /*! \ingroup TArray \fn operator+(const TArray<T>&,T) 168 \brief Operator TArray = TArray + constant */ 168 169 template <class T> inline TArray<T> operator + (const TArray<T>& a, T b) 169 170 {TArray<T> result(a); result.SetTemp(true); result.Add(b); return result;} 170 171 171 //! Operator TArray = constant + TArray 172 /*! \ingroup TArray \fn operator+(T,const TArray<T>&) 173 \brief Operator TArray = constant + TArray */ 172 174 template <class T> inline TArray<T> operator + (T b,const TArray<T>& a) 173 175 {TArray<T> result(a); result.SetTemp(true); result.Add(b); return result;} 174 176 175 //! Operator TArray = TArray - constant 177 /*! \ingroup TArray \fn operator-(const TArray<T>&,T) 178 \brief Operator TArray = TArray - constant */ 176 179 template <class T> inline TArray<T> operator - (const TArray<T>& a, T b) 177 180 {TArray<T> result(a); result.SetTemp(true); result.Sub(b); return result;} 178 181 179 //! Operator TArray = constant - TArray 182 /*! \ingroup TArray \fn operator-(T,const TArray<T>&) 183 \brief Operator TArray = constant - TArray */ 180 184 template <class T> inline TArray<T> operator - (T b,const TArray<T>& a) 181 185 {TArray<T> result(a); result.SetTemp(true); result.SubInv(b); return result;} 182 186 183 //! Operator TArray = TArray * constant 187 /*! \ingroup TArray \fn operator*(const TArray<T>&,T) 188 \brief Operator TArray = TArray * constant */ 184 189 template <class T> inline TArray<T> operator * (const TArray<T>& a, T b) 185 190 {TArray<T> result(a); result.SetTemp(true); result.Mul(b); return result;} 186 191 187 //! Operator TArray = constant * TArray 192 /*! \ingroup TArray \fn operator*(T,const TArray<T>&) 193 \brief Operator TArray = constant * TArray */ 188 194 template <class T> inline TArray<T> operator * (T b,const TArray<T>& a) 189 195 {TArray<T> result(a); result.SetTemp(true); result.Mul(b); return result;} 190 196 191 //! Operator TArray = TArray / constant 197 /*! \ingroup TArray \fn operator/(const TArray<T>&,T) 198 \brief Operator TArray = TArray / constant */ 192 199 template <class T> inline TArray<T> operator / (const TArray<T>& a, T b) 193 200 {TArray<T> result(a); result.SetTemp(true); result.DivInv(b); return result;} … … 196 203 // Surcharge d'operateurs C = A (+,-) B 197 204 198 //! Operator TArray = TArray + TArray 205 /*! \ingroup TArray \fn operator+(const TArray<T>&,const TArray<T>&) 206 \brief Operator TArray = TArray + TArray */ 199 207 template <class T> 200 208 inline TArray<T> operator + (const TArray<T>& a,const TArray<T>& b) 201 209 {TArray<T> result(a); result.SetTemp(true); result.AddElt(b); return result;} 202 210 203 //! Operator TArray = TArray - TArray 211 /*! \ingroup TArray \fn operator-(const TArray<T>&,const TArray<T>&) 212 \brief Operator TArray = TArray - TArray */ 204 213 template <class T> 205 214 inline TArray<T> operator - (const TArray<T>& a,const TArray<T>& b)
Note:
See TracChangeset
for help on using the changeset viewer.