Changeset 2958 in Sophya for trunk/SophyaLib/Samba/alm.h


Ignore:
Timestamp:
Jun 1, 2006, 1:34:50 PM (19 years ago)
Author:
ansari
Message:

1/ passage en sa_size_t (au lieu de int) dans Alm<T> et Bm<T>
2/ Ajout des methodes optimisees (statiques) pour calcul transforme Ylm
ds LambdaLMBuilder et utilisation ds SphericalTransformServer

Reza , 1/06/2006

File:
1 edited

Legend:

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

    r2885 r2958  
    2121Alm() : TriangularMatrix<complex<T> >()  {;};
    2222    /* instanciate the class from the maximum value of the index \f$l\f$ in the sequence of the \f$a_{lm}\f$'s */
    23 Alm(int nlmax) : TriangularMatrix<complex<T> >(nlmax+1) {;}
     23Alm(sa_size_t nlmax) : TriangularMatrix<complex<T> >(nlmax+1) {;}
    2424Alm(const Alm<T>& a,  bool share=false)  : TriangularMatrix<complex<T> >(a, share)  {;}
    2525
    2626Alm(const TVector<T>& clin, const r_8 fwhm) ;
    2727/*! resize with a new lmax */
    28 inline void ReSizeToLmax(int_4 nlmax) {this->ReSizeRow(nlmax+1);}
    29 inline int_4 Lmax() const {return this->rowNumber()-1;}
     28inline void ReSizeToLmax(sa_size_t nlmax) {this->ReSizeRow(nlmax+1);}
     29inline sa_size_t Lmax() const {return this->rowNumber()-1;}
    3030TVector<T> powerSpectrum() const;
    3131
     
    4848Bm(): nmmax_(0) {;};
    4949    /* instanciate from the maximum absolute value of the index */
    50 Bm(int mmax) : nmmax_((uint_4)mmax)   { bm_.ReSize( (uint_4)(2*mmax+1) );}
     50Bm(sa_size_t mmax) : nmmax_(mmax)   { bm_.ReSize( (2*mmax+1) );}
    5151 Bm(const Bm<T>& b,  bool share=false) : nmmax_(b.nmmax_), bm_(b.bm_, share) {;}
    5252 /*! resize with a new value of mmax */
    53 inline void ReSizeToMmax(int_4 mmax)
     53inline void ReSizeToMmax(sa_size_t mmax)
    5454  {
    55     nmmax_=(uint_4)mmax;
     55    nmmax_= mmax;
    5656    bm_.ReSize(2* nmmax_+1);
    5757  }
    58 //inline int_4 Size() const {return 2*nmmax_+1;};
    59 inline T& operator()(int m) {return bm_( adr_i(m));};
    60 inline T const& operator()(int m) const {return *(bm_.Begin()+ adr_i(m));};
     58//inline sa_size_t Size() const {return 2*nmmax_+1;};
     59inline T& operator()(sa_size_t m) {return bm_( adr_i(m));};
     60inline T const& operator()(sa_size_t m) const {return *(bm_.Begin()+ adr_i(m));};
    6161/*! return the current value of the maximum absolute value of the index */
    62 inline int_4 Mmax() const
     62inline sa_size_t Mmax() const
    6363   {
    64      return (int_4)nmmax_;
     64     return nmmax_;
    6565   }
    6666inline Bm<T>& operator = (const Bm<T>& b)
     
    7676  private:
    7777/*! return the address in the array representing the vector */
    78 inline uint_4 adr_i(int i) const
     78inline sa_size_t adr_i(sa_size_t i) const
    7979{
    80   return(uint_4)(i+nmmax_);
     80  return (i+nmmax_);
    8181}
    8282
    8383
    8484
    85  uint_4 nmmax_;
     85 sa_size_t nmmax_;
    8686 NDataBlock<T> bm_;
    8787
Note: See TracChangeset for help on using the changeset viewer.