#ifndef PIXELMAP_SEEN #define PIXELMAP_SEEN #include "ppersist.h" #include "dvlist.h" #include // General map of pixels on part of sphere or whole sphere // Class hierarchy : // PixelMap // SphericalMap // SphereThetaPhi // SphereGorski // SphereIco // LocalMap template class PixelMap { public: PixelMap():mInfo_(NULL) {}; virtual ~PixelMap() {}; // Number of pixels virtual int NbPixels() const=0; // Value of pixel number k virtual T& PixVal(int k)=0; virtual T const& PixVal(int k) const=0; // Index of pixel at (theta,phi) virtual int PixIndexSph(double theta, double phi) const=0; // Value of pixel number at (theta,phi) virtual T& PixValSph(double theta, double phi) {return PixVal(PixIndexSph(theta,phi));} virtual T const& PixValSph(double theta, double phi) const {return PixVal(PixIndexSph(theta,phi));} // Spherical coordinates of center of pixel number k virtual void PixThetaPhi(int k, double& theta, double& phi) const=0; // provides a integer characterizing the pixelization refinement // (depending of the type of the map) virtual int SizeIndex() const=0; virtual char* TypeOfMap() const =0; // Pixel (steradians) virtual double PixSolAngle(int k) const =0; // Overloading of () to access pixel number k. inline T& operator()(int k) {return(PixVal(k));} inline T const& operator()(int k) const {return(PixVal(k));} // Note : no overloading of (double,double) to access pixel (theta,phi). // overloading of (double,double) in SphericalMap // overloading of (int,int) in CartesianMap //++ DVList& Info() // // Renvoie une reference sur l''objet DVList Associe //-- { if (mInfo_ == NULL) mInfo_ = new DVList; return(*mInfo_); } const DVList* ptrInfo() const { return mInfo_; } protected : DVList* mInfo_; // Infos (variables) attachees }; #endif