Changeset 1551 in Sophya for trunk/SophyaLib/SkyMap/localmap.cc


Ignore:
Timestamp:
Jun 27, 2001, 10:14:39 AM (24 years ago)
Author:
ansari
Message:

Operateurs arithmetiques corriges,completes sur les PixelMap (LocalMap et SphericalMaps) - Reza 27/6/2001

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/localmap.cc

    r1431 r1551  
    640640  if (nSzX_ != a.nSzX_ || nSzY_ != a.nSzY_)
    641641    {
    642     throw(SzMismatchError("LocalMap<T>::AddElt(const LocalMap<T>&) SizeMismatch")) ;
     642    throw(SzMismatchError("LocalMap<T>::SubElt(const LocalMap<T>&) SizeMismatch")) ;
    643643    }
    644644  pixels_ -= a.pixels_;
     
    652652  if (nSzX_ != a.nSzX_ || nSzY_ != a.nSzY_)
    653653    {
    654     throw(SzMismatchError("LocalMap<T>::AddElt(const LocalMap<T>&) SizeMismatch")) ;
     654    throw(SzMismatchError("LocalMap<T>::MulElt(const LocalMap<T>&) SizeMismatch")) ;
    655655    }
    656656  pixels_ *= a.pixels_;
     657  return (*this);
     658}
     659
     660//! Divide two LocalMaps (elements by elements) - No protection for divide by 0
     661template <class T>
     662LocalMap<T>& LocalMap<T>::DivElt(const LocalMap<T>& a)
     663{
     664  if (nSzX_ != a.nSzX_ || nSzY_ != a.nSzY_)
     665    {
     666    throw(SzMismatchError("LocalMap<T>::DivElt(const LocalMap<T>&) SizeMismatch")) ;
     667    }
     668  pixels_ /= a.pixels_;
    657669  return (*this);
    658670}
Note: See TracChangeset for help on using the changeset viewer.