Diana Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
QComplex Class Reference
Inheritance diagram for QComplex:
QObject

Public Member Functions

 QComplex ()
 default constructor
More...
 
 QComplex (const double Re, const double Im=0)
 
 QComplex (const QComplex &orig)
 copy constructor
More...
 
 ~QComplex ()
 
void Clear ()
 clear More...
 
double Re () const
 
double Im () const
 
void SetRe (const double Re)
 
void SetIm (const double Im)
 
void Set (const double Re, const double Im)
 
void SetPolar (const double mag, const double phase)
 
double GetModulusSquare () const
 
double GetMagnitude () const
 
double GetPhase () const
 
QComplex Conj () const
 
QComplex operator+ (const QComplex &other) const
 
QComplex operator- (const QComplex &other) const
 
QComplex operator* (const QComplex &other) const
 
QComplex operator/ (const QComplex &other) const
 
QComplexoperator+= (const QComplex &other)
 
QComplexoperator-= (const QComplex &other)
 
QComplexoperator*= (const QComplex &other)
 
QComplexoperator/= (const QComplex &other)
 
QComplex operator+ (const double other) const
 
QComplex operator- (const double other) const
 
QComplex operator* (const double other) const
 
QComplex operator/ (const double other) const
 
QComplexoperator+= (const double other)
 
QComplexoperator-= (const double other)
 
QComplexoperator*= (const double other)
 
QComplexoperator/= (const double other)
 
QVectorC operator* (const QVectorC &vec) const
 
const QComplexoperator= (const QComplex &other)
 
- Public Member Functions inherited from QObject
 QObject ()
 default constructor More...
 
virtual ~QObject ()
 destructor More...
 
QObjectoperator= (const QObject &rhs)
 operator= More...
 
void Validate ()
 make object valid More...
 
void InValidate ()
 make object non valid More...
 
bool IsValid () const
 check wheter object is valid More...
 
void SetWrite (bool write=true)
 write or not this object More...
 
bool GetWrite () const
 check wheter write or not this object More...
 
bool IsRequired () const
 check wheter this object is required by some module More...
 
void SetIsRequired (bool required=true)
 set that this object is required
More...
 
bool IsJustAdded () const
 check wheter this object has been just added by some module More...
 
void SetIsJustAdded (bool added=true)
 set that this object has been just added
More...
 
void Reset ()
 set object to non valid and calls Clear() More...
 
virtual bool Fill (QObject *evData) const =0
 calls operator= of inheriting classes. Validity flag and bits are not copied. This function is automatically declared/implemented in derived classes by QObjectDef/QObjectImp. If evData type mismatches returns false, true otherwise. More...
 
void FullyFill (QObject *evData) const
 calls Fill(QObject*) if this QObject IsValid(). Copies Validity flag and bits More...
 
virtual QObjectDuplicate () const =0
 create object of same type, this function is automatically declared/implemented in derived classes by QObjectDef/QObjectImp More...
 
virtual void Dump (std::ostream &o) const
 print content to stream (intended for screen print or log files) More...
 
virtual void Print () const
 print content on screen More...
 
virtual QError WriteOnStream (std::ostream &o) const
 print content to stream (intended for storage in text files) More...
 
virtual QError ReadFromStream (std::istream &o)
 fill content from stream (intended for storage in text files) More...
 
void CopyBits (QObject *obj) const
 copy validity and temporary bits to another QObject More...
 
virtual void Draw (Option_t *option="")
 

Private Member Functions

 QComplex (double *other)
 
 QComplex (gsl_complex *other)
 
 QComplex (gsl_complex other)
 
gsl_complex Get_gsl_complex () const
 
 QObjectDef (QComplex, 2)
 

Private Attributes

bool fOwner
 
int fSize
 
double * fData
 

Friends

class QVectorC
 
class QMatrixC
 

Additional Inherited Members

- Public Types inherited from QObject
enum  { kIsValid = BIT(15) , kWrite = BIT(0) , kIsRequired = BIT(1) , kIsJustAdded = BIT(2) }
 TObject bits. More...
 
- Static Public Member Functions inherited from QObject
static QObjectNew (const char *object)
 

Detailed Description

Definition at line 19 of file QComplex.hh.

Constructor & Destructor Documentation

◆ QComplex() [1/6]

Q_BEGIN_NAMESPACE QComplex::QComplex ( )

default constructor

Definition at line 18 of file QComplex.cc.

References fData.

Referenced by Conj(), operator*(), operator+(), operator-(), and operator/().

◆ QComplex() [2/6]

QComplex::QComplex ( const double  Re,
const double  Im = 0 
)

@constructed from two double

Parameters
rereal part
imimaginary part

Definition at line 25 of file QComplex.cc.

References fData, Im(), and Re().

◆ QComplex() [3/6]

QComplex::QComplex ( const QComplex orig)

copy constructor

Parameters
origoriginal QVectorC

Definition at line 58 of file QComplex.cc.

References fData.

◆ ~QComplex()

QComplex::~QComplex ( )

Definition at line 67 of file QComplex.cc.

References fData, and fOwner.

◆ QComplex() [4/6]

QComplex::QComplex ( double *  other)
private

Definition at line 34 of file QComplex.cc.

References fData.

◆ QComplex() [5/6]

QComplex::QComplex ( gsl_complex *  other)
private

Definition at line 51 of file QComplex.cc.

References fData.

◆ QComplex() [6/6]

QComplex::QComplex ( gsl_complex  other)
private

Definition at line 41 of file QComplex.cc.

References fData.

Member Function Documentation

◆ Clear()

void QComplex::Clear ( )
inlinevirtual

clear

Implements QObject.

Definition at line 42 of file QComplex.hh.

References fData, and Q_DOUBLE_DEFAULT.

◆ Conj()

QComplex QComplex::Conj ( ) const

Definition at line 101 of file QComplex.cc.

References fData, and QComplex().

◆ Get_gsl_complex()

gsl_complex QComplex::Get_gsl_complex ( ) const
private

◆ GetMagnitude()

double QComplex::GetMagnitude ( ) const

Definition at line 91 of file QComplex.cc.

References GetModulusSquare().

Referenced by QMatrixC::Magnitude().

◆ GetModulusSquare()

double QComplex::GetModulusSquare ( ) const

Definition at line 86 of file QComplex.cc.

References fData.

Referenced by GetMagnitude(), and operator/().

◆ GetPhase()

double QComplex::GetPhase ( ) const

Definition at line 96 of file QComplex.cc.

References fData.

Referenced by QVectorC::GetPhase().

◆ Im()

double QComplex::Im ( ) const

Definition at line 73 of file QComplex.cc.

References fData.

Referenced by QVectorC::Append(), QMatrixCArray::Initialize(), QVectorC::Initialize(), QComplex(), Set(), and SetIm().

◆ operator*() [1/3]

QComplex QComplex::operator* ( const double  other) const

Definition at line 166 of file QComplex.cc.

References fData, and QComplex().

◆ operator*() [2/3]

QComplex QComplex::operator* ( const QComplex other) const

Definition at line 116 of file QComplex.cc.

References fData, and QComplex().

◆ operator*() [3/3]

QVectorC QComplex::operator* ( const QVectorC vec) const

Definition at line 209 of file QComplex.cc.

References vec.

◆ operator*=() [1/2]

QComplex & QComplex::operator*= ( const double  other)

Definition at line 187 of file QComplex.cc.

References fData.

◆ operator*=() [2/2]

QComplex & QComplex::operator*= ( const QComplex other)

Definition at line 144 of file QComplex.cc.

◆ operator+() [1/2]

QComplex QComplex::operator+ ( const double  other) const

Definition at line 156 of file QComplex.cc.

References fData, and QComplex().

◆ operator+() [2/2]

QComplex QComplex::operator+ ( const QComplex other) const

Definition at line 106 of file QComplex.cc.

References fData, and QComplex().

◆ operator+=() [1/2]

QComplex & QComplex::operator+= ( const double  other)

Definition at line 175 of file QComplex.cc.

References fData.

◆ operator+=() [2/2]

QComplex & QComplex::operator+= ( const QComplex other)

Definition at line 130 of file QComplex.cc.

References fData.

◆ operator-() [1/2]

QComplex QComplex::operator- ( const double  other) const

Definition at line 161 of file QComplex.cc.

References fData, and QComplex().

◆ operator-() [2/2]

QComplex QComplex::operator- ( const QComplex other) const

Definition at line 111 of file QComplex.cc.

References fData, and QComplex().

◆ operator-=() [1/2]

QComplex & QComplex::operator-= ( const double  other)

Definition at line 181 of file QComplex.cc.

References fData.

◆ operator-=() [2/2]

QComplex & QComplex::operator-= ( const QComplex other)

Definition at line 137 of file QComplex.cc.

References fData.

◆ operator/() [1/2]

QComplex QComplex::operator/ ( const double  other) const

Definition at line 171 of file QComplex.cc.

References fData, and QComplex().

◆ operator/() [2/2]

QComplex QComplex::operator/ ( const QComplex other) const

Definition at line 123 of file QComplex.cc.

References fData, GetModulusSquare(), and QComplex().

◆ operator/=() [1/2]

QComplex & QComplex::operator/= ( const double  other)

Definition at line 194 of file QComplex.cc.

References fData.

◆ operator/=() [2/2]

QComplex & QComplex::operator/= ( const QComplex other)

Definition at line 150 of file QComplex.cc.

◆ operator=()

const QComplex & QComplex::operator= ( const QComplex other)

Definition at line 201 of file QComplex.cc.

References fData.

◆ QObjectDef()

QComplex::QObjectDef ( QComplex  ,
 
)
private

◆ Re()

double QComplex::Re ( ) const

Definition at line 72 of file QComplex.cc.

References fData.

Referenced by QVectorC::Append(), QMatrixCArray::Initialize(), QVectorC::Initialize(), QComplex(), Set(), and SetRe().

◆ Set()

void QComplex::Set ( const double  Re,
const double  Im 
)

Definition at line 79 of file QComplex.cc.

References fData, Im(), and Re().

◆ SetIm()

void QComplex::SetIm ( const double  Im)

Definition at line 76 of file QComplex.cc.

References fData, and Im().

Referenced by QMatrixC::QMatrixC().

◆ SetPolar()

void QComplex::SetPolar ( const double  mag,
const double  phase 
)

Definition at line 82 of file QComplex.cc.

References cos(), fData, and sin().

◆ SetRe()

void QComplex::SetRe ( const double  Re)

Definition at line 75 of file QComplex.cc.

References fData, and Re().

Referenced by QMatrixC::QMatrixC().

Friends And Related Function Documentation

◆ QMatrixC

friend class QMatrixC
friend

Definition at line 87 of file QComplex.hh.

◆ QVectorC

friend class QVectorC
friend

Definition at line 86 of file QComplex.hh.

Member Data Documentation

◆ fData

double* QComplex::fData
private

◆ fOwner

bool QComplex::fOwner
private

Definition at line 82 of file QComplex.hh.

Referenced by ~QComplex().

◆ fSize

int QComplex::fSize
private

Definition at line 83 of file QComplex.hh.


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