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

Class for defining a complex number. More...

#include <LauComplex.hh>

Public Member Functions

 LauComplex (Double_t a=0.0, Double_t b=0.0)
 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 ( Double_t  a = 0.0,
Double_t  b = 0.0 
)
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 55 of file LauComplex.hh.

virtual LauComplex::~LauComplex ( )
inlinevirtual

Destructor.

Definition at line 58 of file LauComplex.hh.

LauComplex::LauComplex ( const LauComplex other)
inline

Copy constructor.

Parameters
[in]otherthe complex number to be copied

Definition at line 64 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 220 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 229 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 238 of file LauComplex.hh.

LauComplex LauComplex::conj ( ) const
inline

Obtain the complex conjugate.

Returns
the complex conjugate

Definition at line 257 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 247 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 211 of file LauComplex.hh.

void LauComplex::makeConj ( )
inline

Transform this to its complex conjugate.

Definition at line 263 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 118 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 166 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 94 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 142 of file LauComplex.hh.

LauComplex LauComplex::operator- ( ) const
inline

Unary minus operator.

Returns
the negated complex number

Definition at line 84 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 106 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 154 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 130 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 179 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 71 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 193 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 202 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 282 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 273 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 301 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 311 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 292 of file LauComplex.hh.

void LauComplex::zero ( )
inline

Set both real and imaginary part to zero.

Definition at line 318 of file LauComplex.hh.

Member Data Documentation

Double_t LauComplex::im_
private

The imaginary part.

Definition at line 330 of file LauComplex.hh.

Double_t LauComplex::re_
private

The real part.

Definition at line 328 of file LauComplex.hh.


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