laura is hosted by Hepforge, IPPP Durham
Laura++  v3r5
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 61 of file LauComplex.hh.

Constructor & Destructor Documentation

LauComplex::LauComplex ( )
inline

Default Constructor.

Definition at line 65 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 72 of file LauComplex.hh.

virtual LauComplex::~LauComplex ( )
inlinevirtual

Destructor.

Definition at line 75 of file LauComplex.hh.

LauComplex::LauComplex ( const LauComplex other)
inline

Copy constructor.

Parameters
[in]otherthe complex number to be copied

Definition at line 81 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 237 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 246 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 255 of file LauComplex.hh.

LauComplex LauComplex::conj ( ) const
inline

Obtain the complex conjugate.

Returns
the complex conjugate

Definition at line 274 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 264 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 228 of file LauComplex.hh.

void LauComplex::makeConj ( )
inline

Transform this to its complex conjugate.

Definition at line 280 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 135 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 183 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 111 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 159 of file LauComplex.hh.

LauComplex LauComplex::operator- ( ) const
inline

Unary minus operator.

Returns
the negated complex number

Definition at line 101 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 123 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 171 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 147 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 196 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 88 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 210 of file LauComplex.hh.

void LauComplex::print ( ) const

Print the complex number.

Definition at line 52 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 219 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 299 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 290 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 318 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 328 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 309 of file LauComplex.hh.

void LauComplex::zero ( )
inline

Set both real and imaginary part to zero.

Definition at line 335 of file LauComplex.hh.

Member Data Documentation

Double_t LauComplex::im_
private

The imaginary part.

Definition at line 347 of file LauComplex.hh.

Double_t LauComplex::re_
private

The real part.

Definition at line 345 of file LauComplex.hh.


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