laura is hosted by Hepforge, IPPP Durham
Laura++  v3r0
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Class for defining a complex number. More...

#include <LauComplex.hh>

Public Member Functions

 LauComplex ()
 Default Constructor. More...
 
 LauComplex (Double_t a, Double_t b)
 Constructor. More...
 
virtual ~LauComplex ()
 Destructor. More...
 
 LauComplex (const LauComplex &other)
 Copy constructor. More...
 
LauComplexoperator= (const LauComplex &other)
 Copy assignment operator. More...
 
LauComplex operator- () const
 Unary minus operator. More...
 
LauComplex operator+ (const LauComplex &other) const
 Addition operator. More...
 
LauComplex operator- (const LauComplex &other) const
 Subtraction operator. More...
 
LauComplex operator* (const LauComplex &other) const
 Multiplication operator. More...
 
LauComplex operator/ (const LauComplex &other) const
 Division operator. More...
 
LauComplex operator+= (const LauComplex &other)
 Addition assignment operator. More...
 
LauComplex operator-= (const LauComplex &other)
 Subtraction assignment operator. More...
 
LauComplex operator*= (const LauComplex &other)
 Multiplication assignment operator. More...
 
LauComplex operator/= (const LauComplex &other)
 Division assignment operator. More...
 
Bool_t operator== (const LauComplex &other) const
 Boolean comparison operator. More...
 
Double_t re () const
 Get the real part. More...
 
Double_t im () const
 Get the imaginary part. More...
 
Double_t abs () const
 Obtain the absolute value of the complex number. More...
 
Double_t abs2 () const
 Obtain the square of the absolute value of the complex number. More...
 
Double_t arg () const
 Obtain the phase angle of the complex number. More...
 
LauComplex exp () const
 Obtain the exponential of the complex number. More...
 
LauComplex conj () const
 Obtain the complex conjugate. More...
 
void makeConj ()
 Transform this to its complex conjugate. More...
 
LauComplex scale (Double_t scaleVal) const
 Obtain the complex number scaled by some factor. More...
 
void rescale (Double_t scaleVal)
 Scale this by a factor. More...
 
void setRealPart (Double_t realpart)
 Set the real part. More...
 
void setImagPart (Double_t imagpart)
 Set the imaginary part. More...
 
void setRealImagPart (Double_t realpart, Double_t imagpart)
 Set both real and imaginary part. More...
 
void zero ()
 Set both real and imaginary part to zero. More...
 
void print () const
 Print the complex number. More...
 

Private Attributes

Double_t re_
 The real part. More...
 
Double_t im_
 The imaginary part. More...
 

Detailed Description

Class for defining a complex number.

Class for complex number manipulation. In the function descriptions, the form (a,b) is used to represent a complex number. This is equivalent to the mathematical expression a + ib.

Definition at line 47 of file LauComplex.hh.

Constructor & Destructor Documentation

LauComplex::LauComplex ( )
inline

Default Constructor.

Definition at line 51 of file LauComplex.hh.

LauComplex::LauComplex ( Double_t  a,
Double_t  b 
)
inline

Constructor.

Parameters
[in]athe value corresponding to the real part of the complex number
[in]bthe value corresponding to the imaginary part of the complex number

Definition at line 58 of file LauComplex.hh.

virtual LauComplex::~LauComplex ( )
inlinevirtual

Destructor.

Definition at line 61 of file LauComplex.hh.

LauComplex::LauComplex ( const LauComplex other)
inline

Copy constructor.

Parameters
[in]otherthe complex number to be copied

Definition at line 67 of file LauComplex.hh.

Member Function Documentation

Double_t LauComplex::abs ( ) const
inline

Obtain the absolute value of the complex number.

Returns
the absolute value (magnitude)

Definition at line 223 of file LauComplex.hh.

Double_t LauComplex::abs2 ( ) const
inline

Obtain the square of the absolute value of the complex number.

Returns
the square of the absolute value (magnitude^2)

Definition at line 232 of file LauComplex.hh.

Double_t LauComplex::arg ( ) const
inline

Obtain the phase angle of the complex number.

Returns
the phase angle of the complex number

Definition at line 241 of file LauComplex.hh.

LauComplex LauComplex::conj ( ) const
inline

Obtain the complex conjugate.

Returns
the complex conjugate

Definition at line 260 of file LauComplex.hh.

LauComplex LauComplex::exp ( ) const
inline

Obtain the exponential of the complex number.

Returns
the exponential of the complex number

Definition at line 250 of file LauComplex.hh.

Double_t LauComplex::im ( ) const
inline

Get the imaginary part.

Returns
the imaginary part of the complex number

Definition at line 214 of file LauComplex.hh.

void LauComplex::makeConj ( )
inline

Transform this to its complex conjugate.

Definition at line 266 of file LauComplex.hh.

LauComplex LauComplex::operator* ( const LauComplex other) const
inline

Multiplication operator.

Parameters
[in]otherthe object this one is to be multiplied by
Returns
the product of the two complex numbers

Definition at line 121 of file LauComplex.hh.

LauComplex LauComplex::operator*= ( const LauComplex other)
inline

Multiplication assignment operator.

Parameters
[in]otherthe object this one is to be multiplied by
Returns
the result of the multiplication

Definition at line 169 of file LauComplex.hh.

LauComplex LauComplex::operator+ ( const LauComplex other) const
inline

Addition operator.

Parameters
[in]otherthe object to added to this one
Returns
the sum of the two complex numbers

Definition at line 97 of file LauComplex.hh.

LauComplex LauComplex::operator+= ( const LauComplex other)
inline

Addition assignment operator.

Parameters
[in]otherthe object to be added to this one
Returns
the result of the addition

Definition at line 145 of file LauComplex.hh.

LauComplex LauComplex::operator- ( ) const
inline

Unary minus operator.

Returns
the negated complex number

Definition at line 87 of file LauComplex.hh.

LauComplex LauComplex::operator- ( const LauComplex other) const
inline

Subtraction operator.

Parameters
[in]otherthe object to be subtracted from this one
Returns
the difference of the two complex numbers

Definition at line 109 of file LauComplex.hh.

LauComplex LauComplex::operator-= ( const LauComplex other)
inline

Subtraction assignment operator.

Parameters
[in]otherthe object to be subtracted from this one
Returns
the result of the subtraction

Definition at line 157 of file LauComplex.hh.

LauComplex LauComplex::operator/ ( const LauComplex other) const
inline

Division operator.

Parameters
[in]otherthe object this one is to be divided by
Returns
the ratio of the two complex numbers

Definition at line 133 of file LauComplex.hh.

LauComplex LauComplex::operator/= ( const LauComplex other)
inline

Division assignment operator.

Parameters
[in]otherthe object this one is to be divided by
Returns
the results of the division

Definition at line 182 of file LauComplex.hh.

LauComplex& LauComplex::operator= ( const LauComplex other)
inline

Copy assignment operator.

Parameters
[in]otherthe complex number to be copied
Returns
the assigned complex number

Definition at line 74 of file LauComplex.hh.

Bool_t LauComplex::operator== ( const LauComplex other) const
inline

Boolean comparison operator.

Parameters
[in]otherthe object to compared with this one
Returns
true/false for the comparison

Definition at line 196 of file LauComplex.hh.

void LauComplex::print ( ) const

Print the complex number.

Definition at line 38 of file LauComplex.cc.

Double_t LauComplex::re ( ) const
inline

Get the real part.

Returns
the real part of the complex number

Definition at line 205 of file LauComplex.hh.

void LauComplex::rescale ( Double_t  scaleVal)
inline

Scale this by a factor.

Parameters
[in]scaleValthe value used to scale the complex number

Definition at line 285 of file LauComplex.hh.

LauComplex LauComplex::scale ( Double_t  scaleVal) const
inline

Obtain the complex number scaled by some factor.

Parameters
[in]scaleValthe value used to scale the complex number
Returns
the complex number scaled by the scaleVal

Definition at line 276 of file LauComplex.hh.

void LauComplex::setImagPart ( Double_t  imagpart)
inline

Set the imaginary part.

Parameters
[in]imagpartthe value to be set as the imaginary part

Definition at line 304 of file LauComplex.hh.

void LauComplex::setRealImagPart ( Double_t  realpart,
Double_t  imagpart 
)
inline

Set both real and imaginary part.

Parameters
[in]realpartthe value to be set as the real part
[in]imagpartthe value to be set as the imaginary part

Definition at line 314 of file LauComplex.hh.

void LauComplex::setRealPart ( Double_t  realpart)
inline

Set the real part.

Parameters
[in]realpartthe value to be set as the real part

Definition at line 295 of file LauComplex.hh.

void LauComplex::zero ( )
inline

Set both real and imaginary part to zero.

Definition at line 321 of file LauComplex.hh.

Member Data Documentation

Double_t LauComplex::im_
private

The imaginary part.

Definition at line 333 of file LauComplex.hh.

Double_t LauComplex::re_
private

The real part.

Definition at line 331 of file LauComplex.hh.


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