Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Phi Class Reference

Utility class to implement the cyclic nature of the phi variable in the range -Pi <-> Pi. More...

#include <Phi.h>

List of all members.

Public Methods

 Phi ()
 Phi (double init)
 Phi (const Phi &src)
Phi & operator= (const Phi &rhs)
Phi & operator+= (Phi &rhs)
Phi & operator-= (Phi &in)
Phi operator+ (Phi &in) const
Phi operator- (Phi &in) const
bool operator< (Phi &in) const
bool operator> (Phi &in) const
 operator double () const
double lowerLimit () const
double upperLimit () const
double range () const
double val () const

Private Methods

void reduce ()

Private Attributes

double m_val

Static Private Attributes

const double s_upperLimit = M_PI
const double s_lowerLimit = -M_PI
const double s_range = s_upperLimit - s_lowerLimit


Detailed Description

Utility class to implement the cyclic nature of the phi variable in the range -Pi <-> Pi.

Definition at line 42 of file Phi.h.


Constructor & Destructor Documentation

Phi::Phi   [inline]
 

Definition at line 61 of file Phi.h.

References m_val.

00061 { this->m_val = 0. ;  }

Phi::Phi double    init [inline]
 

Definition at line 62 of file Phi.h.

References m_val, and reduce().

00062 { this->m_val = init ; this->reduce() ; }

Phi::Phi const Phi &    src [inline]
 

Definition at line 63 of file Phi.h.

References m_val.

00063 { this->m_val = src.m_val ; } 


Member Function Documentation

double Phi::lowerLimit   const [inline]
 

Definition at line 101 of file Phi.h.

References s_lowerLimit.

Referenced by operator<<().

00101 {return s_lowerLimit;}

Phi::operator double   const [inline]
 

Definition at line 99 of file Phi.h.

References m_val.

00099 { return this->m_val ; }

Phi Phi::operator+ Phi &    in const [inline]
 

Definition at line 84 of file Phi.h.

00084                                    { 
00085     Phi result( this->m_val + in.m_val ) ;
00086     return result ;
00087   }

Phi& Phi::operator+= Phi &    rhs [inline]
 

Definition at line 72 of file Phi.h.

References m_val, and reduce().

00072                                 { 
00073     this->m_val += rhs.m_val ; 
00074     reduce() ;
00075     return *this; 
00076   }

Phi Phi::operator- Phi &    in const [inline]
 

Definition at line 89 of file Phi.h.

00089                                    { 
00090     Phi result(this->m_val - in.m_val ) ;
00091     return result ;
00092   }

Phi& Phi::operator-= Phi &    in [inline]
 

Definition at line 78 of file Phi.h.

References m_val, and reduce().

00078                                { 
00079     this->m_val -= in.m_val;
00080     reduce() ;
00081     return *this; 
00082   }

bool Phi::operator< Phi &    in const [inline]
 

Definition at line 95 of file Phi.h.

References m_val.

00095 { return this->m_val < in.m_val ; }

Phi& Phi::operator= const Phi &    rhs [inline]
 

Definition at line 67 of file Phi.h.

References m_val.

00067                                     { 
00068     this->m_val = rhs.m_val; 
00069     return *this; 
00070   }

bool Phi::operator> Phi &    in const [inline]
 

Definition at line 96 of file Phi.h.

References m_val.

00096 { return this->m_val > in.m_val ; }

double Phi::range   const [inline]
 

Definition at line 103 of file Phi.h.

References s_range.

Referenced by operator<<().

00103 {return s_range;}

void Phi::reduce   [inline, private]
 

Definition at line 48 of file Phi.h.

References m_val, s_lowerLimit, s_range, and s_upperLimit.

Referenced by operator+=(), operator-=(), and Phi().

00048                 {
00049     while( m_val >  s_upperLimit )  { m_val -= s_range ; }
00050     while( m_val <= s_lowerLimit  ) { m_val += s_range ; }
00051   }

double Phi::upperLimit   const [inline]
 

Definition at line 102 of file Phi.h.

References s_upperLimit.

Referenced by operator<<().

00102 {return s_upperLimit;}

double Phi::val   const [inline]
 

Definition at line 104 of file Phi.h.

References m_val.

Referenced by Atlfast::operator<<(), and operator<<().

00104 {return m_val;}


Member Data Documentation

double Phi::m_val [private]
 

Definition at line 46 of file Phi.h.

Referenced by operator double(), operator+=(), operator-=(), operator<(), operator=(), operator>(), Phi(), reduce(), and val().

const double Phi::s_lowerLimit = -M_PI [static, private]
 

Definition at line 5 of file Phi.cxx.

Referenced by lowerLimit(), and reduce().

const double Phi::s_range = s_upperLimit - s_lowerLimit [static, private]
 

Definition at line 6 of file Phi.cxx.

Referenced by range(), and reduce().

const double Phi::s_upperLimit = M_PI [static, private]
 

Definition at line 4 of file Phi.cxx.

Referenced by reduce(), and upperLimit().


The documentation for this class was generated from the following files:
Generated on Fri Nov 29 12:55:18 2002 by doxygen1.3-rc1