Changeset 1551 in Sophya for trunk/SophyaLib/SkyMap/spherethetaphi.h
- Timestamp:
- Jun 27, 2001, 10:14:39 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/spherethetaphi.h
r1423 r1551 223 223 virtual SphereThetaPhi<T>& MulElt(const SphereThetaPhi<T>& a); 224 224 inline SphereThetaPhi<T>& operator *= (const SphereThetaPhi<T>& a) { return MulElt(a); } 225 virtual SphereThetaPhi<T>& DivElt(const SphereThetaPhi<T>& a); 226 inline SphereThetaPhi<T>& operator /= (const SphereThetaPhi<T>& a) { return DivElt(a); } 225 227 226 228 … … 332 334 return result; } 333 335 336 //////////////////////////////////////////////////////////////// 337 // Surcharge d'operateurs C = A (*,/) B 338 339 /*! \ingroup SkyMap \fn operator*(const SphereThetaPhi<T>&,const SphereThetaPhi<T>&) 340 \brief Operator SphereThetaPhi = SphereThetaPhi * SphereThetaPhi (pixel by pixel multiply)*/ 341 template <class T> 342 inline SphereThetaPhi<T> operator * (const SphereThetaPhi<T>& a,const SphereThetaPhi<T>& b) 343 { SphereThetaPhi<T> result; result.SetTemp(true); 344 if (b.IsTemp()) { result.Share(b); result.MulElt(a); } 345 else { result.CloneOrShare(a); result.MulElt(b); } 346 return result; } 347 348 /*! \ingroup SkyMap \fn operator/(const SphereThetaPhi<T>&,const SphereThetaPhi<T>&) 349 \brief Operator SphereThetaPhi = SphereThetaPhi / SphereThetaPhi (pixel by pixel divide) */ 350 template <class T> 351 inline SphereThetaPhi<T> operator / (const SphereThetaPhi<T>& a,const SphereThetaPhi<T>& b) 352 { SphereThetaPhi<T> result; result.SetTemp(true); 353 if (b.IsTemp()) { result.Share(b); result.DivElt(a, true); } 354 else { result.CloneOrShare(a); result.DivElt(b); } 355 return result; } 356 334 357 335 358 } // Fin du namespace
Note:
See TracChangeset
for help on using the changeset viewer.