Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | List of all members
wat::Alm_Template< T > Class Template Reference

template<typename T>
class wat::Alm_Template< T >

Class for storing spherical harmonic coefficients.

Definition at line 76 of file alm.hh.

Public Member Functions

 Alm_Template (int lmax_=0, int mmax_=0)
 Constructs an Alm_Template object with given lmax and mmax. More...
 
template<typename T2 >
void Add (const T2 &num)
 Adds num to a_00. More...
 
void Add (const Alm_Template &other)
 Adds all coefficients from other to the own coefficients. More...
 
const arr< T > & Alms () const
 Returns a constant reference to the a_lm data. More...
 
Tmstart (int m)
 Returns a pointer for a given m, from which the address of a_lm can be obtained by adding l. More...
 
const Tmstart (int m) const
 Returns a pointer for a given m, from which the address of a_lm can be obtained by adding l. More...
 
Toperator() (int l, int m)
 Returns a reference to the specified coefficient. More...
 
const Toperator() (int l, int m) const
 Returns a constant reference to the specified coefficient. More...
 
template<typename T2 >
void Scale (const T2 &factor)
 Multiplies all coefficients by factor. More...
 
template<typename T2 >
void ScaleL (const arr< T2 > &factor)
 a(l,m) *= factor[l] for all l,m. More...
 
template<typename T2 >
void ScaleM (const arr< T2 > &factor)
 a(l,m) *= factor[m] for all l,m. More...
 
void Set (int lmax_, int mmax_)
 Deletes the old coefficients and allocates storage according to lmax and mmax. More...
 
void Set (arr< T > &data, int lmax_, int mmax_)
 Deallocates the old coefficients and uses the content of data for storage. More...
 
void SetToZero ()
 Sets all coefficients to zero. More...
 
void swap (Alm_Template &other)
 Swaps the contents of two Alm_Template objects. More...
 
- Public Member Functions inherited from wat::Alm_Base
 Alm_Base (int lmax_=0, int mmax_=0)
 Constructs an Alm_Base object with given lmax and mmax. More...
 
bool conformable (const Alm_Base &other) const
 Returns true, if both objects have the same lmax and mmax, else false. More...
 
int index (int l, int m) const
 Returns the array index of the specified coefficient. More...
 
int index_l0 (int m) const
 Returns an array index for a given m, from which the index of a_lm can be obtained by adding l. More...
 
int Lmax () const
 Returns the maximum l. More...
 
int Mmax () const
 Returns the maximum m. More...
 
int Num_Alms (int l, int m)
 Returns the total number of coefficients for maximum quantum numbers l and m. More...
 
void Set (int lmax_, int mmax_)
 Changes the object's maximum quantum numbers to lmax and mmax. More...
 
void swap (Alm_Base &other)
 Swaps the contents of two Alm_Base objects. More...
 

Private Attributes

arr< Talm
 

Additional Inherited Members

- Protected Attributes inherited from wat::Alm_Base
int lmax
 
int mmax
 
int tval
 

#include <alm.hh>

Inheritance diagram for wat::Alm_Template< T >:
[legend]

Constructor & Destructor Documentation

template<typename T>
wat::Alm_Template< T >::Alm_Template ( int  lmax_ = 0,
int  mmax_ = 0 
)
inline

Constructs an Alm_Template object with given lmax and mmax.

Definition at line 85 of file alm.hh.

Member Function Documentation

template<typename T>
template<typename T2 >
void wat::Alm_Template< T >::Add ( const T2 &  num)
inline

Adds num to a_00.

Definition at line 135 of file alm.hh.

template<typename T>
void wat::Alm_Template< T >::Add ( const Alm_Template< T > &  other)
inline

Adds all coefficients from other to the own coefficients.

Definition at line 167 of file alm.hh.

template<typename T>
const arr<T>& wat::Alm_Template< T >::Alms ( ) const
inline

Returns a constant reference to the a_lm data.

Definition at line 156 of file alm.hh.

template<typename T>
T* wat::Alm_Template< T >::mstart ( int  m)
inline

Returns a pointer for a given m, from which the address of a_lm can be obtained by adding l.

Definition at line 147 of file alm.hh.

template<typename T>
const T* wat::Alm_Template< T >::mstart ( int  m) const
inline

Returns a pointer for a given m, from which the address of a_lm can be obtained by adding l.

Definition at line 151 of file alm.hh.

template<typename T>
T& wat::Alm_Template< T >::operator() ( int  l,
int  m 
)
inline

Returns a reference to the specified coefficient.

Definition at line 139 of file alm.hh.

template<typename T>
const T& wat::Alm_Template< T >::operator() ( int  l,
int  m 
) const
inline

Returns a constant reference to the specified coefficient.

Definition at line 142 of file alm.hh.

template<typename T>
template<typename T2 >
void wat::Alm_Template< T >::Scale ( const T2 &  factor)
inline

Multiplies all coefficients by factor.

Definition at line 112 of file alm.hh.

template<typename T>
template<typename T2 >
void wat::Alm_Template< T >::ScaleL ( const arr< T2 > &  factor)
inline

a(l,m) *= factor[l] for all l,m.

Definition at line 116 of file alm.hh.

template<typename T>
template<typename T2 >
void wat::Alm_Template< T >::ScaleM ( const arr< T2 > &  factor)
inline

a(l,m) *= factor[m] for all l,m.

Definition at line 125 of file alm.hh.

template<typename T>
void wat::Alm_Template< T >::Set ( int  lmax_,
int  mmax_ 
)
inline

Deletes the old coefficients and allocates storage according to lmax and mmax.

Definition at line 90 of file alm.hh.

template<typename T>
void wat::Alm_Template< T >::Set ( arr< T > &  data,
int  lmax_,
int  mmax_ 
)
inline

Deallocates the old coefficients and uses the content of data for storage.

data is deallocated during the call.

Definition at line 99 of file alm.hh.

template<typename T>
void wat::Alm_Template< T >::SetToZero ( )
inline

Sets all coefficients to zero.

Definition at line 108 of file alm.hh.

template<typename T>
void wat::Alm_Template< T >::swap ( Alm_Template< T > &  other)
inline

Swaps the contents of two Alm_Template objects.

Definition at line 160 of file alm.hh.

Member Data Documentation

template<typename T>
arr<T> wat::Alm_Template< T >::alm
private

Definition at line 80 of file alm.hh.


The documentation for this class was generated from the following file: