Changeset 470 in Sophya for trunk/SophyaLib/Samba/sphericalmap.h


Ignore:
Timestamp:
Oct 15, 1999, 5:43:30 PM (26 years ago)
Author:
ansari
Message:

versions templatees, NdataBlocks etc. 15-OCT-99-GLM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/sphericalmap.h

    r228 r470  
    66#include <math.h>
    77#include "pixelmap.h"
    8 #include "cvector.h"
     8#include "tvector.h"
     9
    910// Map of pixels on a whole sphere.
    1011// Class hierarchy :
     
    1617//      LocalMap
    1718
    18 class SphericalMap : public PixelMap {
     19template<class T>
     20class SphericalMap : public PixelMap<T>
     21{
     22 
     23public :
    1924
    20 public :
    2125SphericalMap() {};
    2226virtual  ~SphericalMap() {};
    2327
    24    // Overloading of () to access pixel number k.
    25    inline  r_8&        operator()(int_4 k)
    26                           {return(PixVal(k));}
    27    inline  r_8 const&  operator()(int_4 k) const
    28                           {return(PixVal(k));}
    29 inline  r_8&        operator()(float theta, float phi)
    30                 { return(PixValSph(theta, phi)) ; };
    31 inline  r_8 const&        operator()(float theta, float phi) const
    32                 { return(PixValSph(theta, phi)) ; };
     28// Overloading of () to access pixel number k.
     29inline T& operator()(int_4 k) {return(PixVal(k));}
     30inline T  const& operator()(int_4 k) const {return(PixVal(k));}
     31inline T& operator()(float theta,float phi) {return(PixValSph(theta,phi));};
     32inline T  const& operator()(float theta,float phi) const {return(PixValSph(theta,phi));};
    3333
    34 
     34// index characterizing the size pixelization : m for SphereThetaPhi
     35// nside for Gorski sphere...
     36virtual void Resize(int_4 m)=0;
    3537virtual int_4 NbThetaSlices() const=0;
    36 virtual void GetThetaSlice(int_4 index, r_4& theta, Vector& phi, Vector& value) const=0;
     38virtual void GetThetaSlice(int_4 index, r_4& theta, TVector<float>& phi, TVector<T>& value) const=0;
    3739};
    38 
    3940#endif
    4041
Note: See TracChangeset for help on using the changeset viewer.