![]() |
Diana Software
|
Interface for complex vectors in Diana analysis. More...
Public Member Functions | |
| QVectorC () | |
| default constructor More... | |
| QVectorC (const UInt_t size) | |
| constructor with its size More... | |
| QVectorC (const QVectorC &orig) | |
| copy constructor More... | |
| QVectorC (const QVector &re, const QVector &im) | |
| QVectorC (const QVector &vec) | |
| constructor from a single QVector More... | |
| ~QVectorC () | |
| copy only some of the elements More... | |
| void | Clear () |
| clear the vector More... | |
| void | SetArray (const double *re, const double *im, UInt_t size) |
| UInt_t | Size () const |
| size of QVector More... | |
| void | Initialize (const double re=0, const double im=0) |
| initialize elements (default to 0) More... | |
| void | Initialize (const QComplex val) |
| QComplex | operator[] (const UInt_t i) |
| retrieve an element More... | |
| QComplex | operator() (const UInt_t i) |
| const QComplex | operator[] (const UInt_t i) const |
| retrieve an element More... | |
| const QComplex | operator() (const UInt_t i) const |
| const QVectorC & | operator= (const QVectorC &orig) |
| copy the content of another vector More... | |
| QVector & | Re () |
| QVector & | Im () |
| const QVector & | Re () const |
| const QVector & | Im () const |
| QVector | GetMagnitudes () const |
| QVector | GetMagnitudesSquare () const |
| QVector | GetPhase () const |
| QVector | GetModulus () const |
| QVector | GetModulusSquare () const |
| QVectorC | Mult (const QVectorC &other) const |
| multiplication element by element More... | |
| const QVectorC & | MultIn (const QVectorC &other) |
| multiplication element by element by the given vector More... | |
| QVectorC | Mult (const QVector &other) const |
| multiplication element by element More... | |
| QVectorC | Div (const QVectorC &other) const |
| multiplication element by element More... | |
| const QVectorC & | DivIn (const QVectorC &other) |
| division element by element by the given vector More... | |
| QVectorC | Div (const QVector &other) const |
| multiplication element by element More... | |
| const QVectorC & | Rebin (const int rebin, bool sum=false) |
| Rebin the vector. More... | |
| const QVectorC & | Shift (const int nstep) |
| Cyclic shift of vector. More... | |
| const QVectorC & | ShiftReal (const double fstep) |
| Cyclic shift of vector by a real number, first shift by the integer part of fstep then linear interpolation between samples is performed. More... | |
| QVectorC | operator- () const |
| revert sign to all components More... | |
| const QVectorC & | operator*= (const double t) |
| multiplication by scalar More... | |
| const QVectorC & | operator*= (const QComplex &t) |
| multiplication by complex number More... | |
| const QVectorC & | operator/= (const double v) |
| divide by scalar More... | |
| const QVectorC & | operator/= (const QComplex &t) |
| divide by complex number More... | |
| const QVectorC & | operator-= (const QComplex &t) |
| add a QVectorC More... | |
| const QVectorC & | operator+= (const QVectorC &v) |
| const QVectorC & | operator-= (const QVectorC &v) |
| subtract a QVectorC More... | |
| QComplex | operator* (const QVectorC &other) const |
| complex conjugate scalar product (v^H * u) More... | |
| QVectorC | operator* (const double t) const |
| multiply by scalar More... | |
| QMatrixC | operator* (const QMatrixC &) const |
| multiply by matrix More... | |
| QVectorC | operator+ (const QVectorC &other) const |
| sum vector More... | |
| QVectorC | operator- (const QVectorC &other) const |
| subtract vector More... | |
| QVectorC | operator/ (const double t) const |
| divide by scalar More... | |
| QMatrixC | H () const |
| transpose conjugate More... | |
| QVectorC & | Conjugate () |
| QVectorC | Conj () const |
| QVectorC | operator* (const QComplex &t) const |
| QVectorC | operator/ (const QComplex &t) const |
| divide by complex number More... | |
| void | Resize (const UInt_t newsize) |
| void | Append (const QComplex &val) |
| append More... | |
| void | Append (const double re, const double im=0) |
| void | Append (const QVectorC &vec) |
| void | SetRe (const QVector &re) |
| Set real part. More... | |
| void | SetIm (const QVector &im) |
| Set imag part. More... | |
Public Member Functions inherited from QObject | |
| QObject () | |
| default constructor More... | |
| virtual | ~QObject () |
| destructor More... | |
| QObject & | operator= (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 QObject * | Duplicate () 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="") |
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 QObject * | New (const char *object) |
Interface for complex vectors in Diana analysis.
Definition at line 25 of file QVectorC.hh.
| QVectorC::QVectorC | ( | ) |
default constructor
Definition at line 41 of file QVectorC.cc.
|
explicit |
constructor with its size
| size | start size of QVector |
Definition at line 54 of file QVectorC.cc.
References QVector::ArrayAlloc().
| QVectorC::QVectorC | ( | const QVectorC & | orig | ) |
@constructed from two vectors
| re | real part |
| im | imaginary part |
Definition at line 86 of file QVectorC.cc.
References QVector::ArrayAlloc(), DianaThrow, QVector::fSize, QERR_SIZE_NOT_MATCH, QVector::Size(), and Size().
|
explicit |
constructor from a single QVector
assumes input QVector has even number of members the first half is the real part, the second half the imaginary part
Definition at line 70 of file QVectorC.cc.
References QVector::ArrayAlloc(), QVector::Size(), Size(), and vec.
| QVectorC::~QVectorC | ( | ) |
copy only some of the elements
| orig | original QVector |
| size | number of elements to copy |
| ioff | first element to copy |
constructor from QMatrix
build a vector out of a QMatrix taking only the first column
| mat | QMatrix of origin |
destructor
Definition at line 153 of file QVectorC.cc.
References QVector::ArrayFree().
| void QVectorC::Append | ( | const double | re, |
| const double | im = 0 |
||
| ) |
Definition at line 601 of file QVectorC.cc.
References Append().
| void QVectorC::Append | ( | const QComplex & | val | ) |
append
add one more element at the end of the vector
| val |
Definition at line 579 of file QVectorC.cc.
References QVector::ArrayAlloc(), QVector::ArrayFree(), DianaThrow, QComplex::Im(), QERR_SIZE_NOT_MATCH, QComplex::Re(), and Size().
Referenced by Append().
| void QVectorC::Append | ( | const QVectorC & | vec | ) |
Definition at line 607 of file QVectorC.cc.
References Append(), QVector::Size(), and vec.
|
inlinevirtual |
clear the vector
Implements QObject.
Definition at line 75 of file QVectorC.hh.
References Resize().
Referenced by QAverageVectorC::Clear().
| QVectorC QVectorC::Conj | ( | ) | const |
| QVectorC & QVectorC::Conjugate | ( | ) |
multiplication element by element
v[i]=v1[i]/v2[i]
| other |
Definition at line 427 of file QVectorC.cc.
References b, DianaThrow, QERR_SIZE_NOT_MATCH, QVector::Size(), and Size().
multiplication element by element
v[i]=v1[i]/v2[i]
| other |
Definition at line 403 of file QVectorC.cc.
References b, DianaThrow, QVector::fMathVec, QVector::fSize, QERR_SIZE_NOT_MATCH, and QVector::SetMathVector().
division element by element by the given vector
v[i]=v1[i]/v2[i]
| other |
Definition at line 416 of file QVectorC.cc.
References b, DianaThrow, QVector::fMathVec, QVector::fSize, QERR_SIZE_NOT_MATCH, and QVector::SetMathVector().
| QVector QVectorC::GetMagnitudes | ( | ) | const |
| QVector QVectorC::GetMagnitudesSquare | ( | ) | const |
|
inline |
Definition at line 120 of file QVectorC.hh.
References GetMagnitudes().
|
inline |
Definition at line 121 of file QVectorC.hh.
References GetMagnitudesSquare().
| QVector QVectorC::GetPhase | ( | ) | const |
Definition at line 328 of file QVectorC.cc.
References QComplex::GetPhase(), operator[](), and Size().
| QMatrixC QVectorC::H | ( | ) | const |
transpose conjugate
a transposed vector is a matrix with a single row
Definition at line 559 of file QVectorC.cc.
References Conj(), QMatrixC::SetRow(), and Size().
| QVector & QVectorC::Im | ( | ) |
Definition at line 313 of file QVectorC.cc.
| const QVector & QVectorC::Im | ( | ) | const |
Definition at line 323 of file QVectorC.cc.
| void QVectorC::Initialize | ( | const double | re = 0, |
| const double | im = 0 |
||
| ) |
initialize elements (default to 0)
| val |
Definition at line 216 of file QVectorC.cc.
References Size().
Referenced by Initialize().
| void QVectorC::Initialize | ( | const QComplex | val | ) |
Definition at line 223 of file QVectorC.cc.
References QComplex::Im(), Initialize(), and QComplex::Re().
multiplication element by element
v[i]=v1[i]*v2[i]
| other |
Definition at line 386 of file QVectorC.cc.
References b, DianaThrow, QERR_SIZE_NOT_MATCH, QVector::Size(), and Size().
multiplication element by element
v[i]=v1[i]*v2[i]
| other |
Definition at line 360 of file QVectorC.cc.
References b, DianaThrow, QVector::fMathVec, QERR_SIZE_NOT_MATCH, QVector::SetMathVector(), QVector::Size(), and Size().
multiplication element by element by the given vector
v[i]=v1[i]*v2[i]
| other |
Definition at line 374 of file QVectorC.cc.
References b, DianaThrow, QVector::fMathVec, QERR_SIZE_NOT_MATCH, QVector::SetMathVector(), QVector::Size(), and Size().
|
inline |
Definition at line 95 of file QVectorC.hh.
References operator[]().
|
inline |
Definition at line 104 of file QVectorC.hh.
References operator[]().
| QVectorC QVectorC::operator* | ( | const double | t | ) | const |
multiply by scalar
| t | right element |
Definition at line 488 of file QVectorC.cc.
Definition at line 546 of file QVectorC.cc.
multiply by matrix
| t | right element |
Definition at line 301 of file QVectorC.cc.
References QMatrixC::SetCol(), and Size().
complex conjugate scalar product (v^H * u)
| other | right element |
Definition at line 479 of file QVectorC.cc.
| const QVectorC & QVectorC::operator*= | ( | const double | t | ) |
multiplication by scalar
| t |
Definition at line 449 of file QVectorC.cc.
Referenced by operator/=().
multiplication by complex number
| t |
Definition at line 516 of file QVectorC.cc.
References QComplex::Get_gsl_complex().
sum vector
| other | right element |
Definition at line 502 of file QVectorC.cc.
Definition at line 457 of file QVectorC.cc.
References b, DianaThrow, QVector::fMathVec, QVector::fSize, QERR_SIZE_NOT_MATCH, and QVector::SetMathVector().
Referenced by operator-=().
| QVectorC QVectorC::operator- | ( | ) | const |
revert sign to all components
Definition at line 354 of file QVectorC.cc.
subtract vector
| other | right element |
Definition at line 509 of file QVectorC.cc.
add a QVectorC
| v |
subtract a complex number
| t |
Definition at line 525 of file QVectorC.cc.
References QComplex::Get_gsl_complex().
subtract a QVectorC
| v |
Definition at line 473 of file QVectorC.cc.
References operator+=().
| QVectorC QVectorC::operator/ | ( | const double | t | ) | const |
divide by scalar
| t | right element |
Definition at line 495 of file QVectorC.cc.
divide by complex number
| t |
Definition at line 553 of file QVectorC.cc.
| const QVectorC & QVectorC::operator/= | ( | const double | v | ) |
divide by scalar
| t |
Definition at line 444 of file QVectorC.cc.
References operator*=().
divide by complex number
| t |
Definition at line 536 of file QVectorC.cc.
References QComplex::Get_gsl_complex().
copy the content of another vector
| orig | original QVector |
Definition at line 294 of file QVectorC.cc.
References Resize(), and Size().
Referenced by QAverageVectorC::operator=(), and QAverageVectorC::ReadFromStream().
| QComplex QVectorC::operator[] | ( | const UInt_t | i | ) |
retrieve an element
| i | ith element |
Definition at line 272 of file QVectorC.cc.
References DianaThrow, Q_DOUBLE_DEFAULT, QERR_OUT_OF_RANGE, and Size().
Referenced by GetPhase(), and operator()().
| const QComplex QVectorC::operator[] | ( | const UInt_t | i | ) | const |
retrieve an element
version for objects that cannot modify the QVector
| i | ith element |
Definition at line 283 of file QVectorC.cc.
References DianaThrow, Q_DOUBLE_DEFAULT, QERR_OUT_OF_RANGE, and Size().
| QVector & QVectorC::Re | ( | ) |
Definition at line 308 of file QVectorC.cc.
| const QVector & QVectorC::Re | ( | ) | const |
Definition at line 318 of file QVectorC.cc.
| const QVectorC & QVectorC::Rebin | ( | const int | rebin, |
| bool | sum = false |
||
| ) |
Rebin the vector.
| rebin | Combine rebin bins into one |
| sum | Either sum the bins together (if sum is true), otherwise average them |
Definition at line 227 of file QVectorC.cc.
| void QVectorC::Resize | ( | const UInt_t | newsize | ) |
Definition at line 179 of file QVectorC.cc.
References QVector::ArrayAlloc(), QVector::ArrayFree(), DianaThrow, QERR_SIZE_NOT_MATCH, and Size().
Referenced by QMatrixC::CholeskySolveX(), Clear(), operator=(), Rebin(), and SetArray().
| void QVectorC::SetArray | ( | const double * | re, |
| const double * | im, | ||
| UInt_t | size | ||
| ) |
Definition at line 208 of file QVectorC.cc.
References Resize().
| void QVectorC::SetIm | ( | const QVector & | im | ) |
Set imag part.
Definition at line 628 of file QVectorC.cc.
References DianaThrow, QERR_SIZE_NOT_MATCH, QVector::Size(), and Size().
| void QVectorC::SetRe | ( | const QVector & | re | ) |
Set real part.
Definition at line 615 of file QVectorC.cc.
References DianaThrow, QERR_SIZE_NOT_MATCH, QVector::Size(), and Size().
| const QVectorC & QVectorC::Shift | ( | const int | nstep | ) |
Cyclic shift of vector.
| nstep | if > 0 shift right, if < 0 shift left |
Definition at line 240 of file QVectorC.cc.
Referenced by ShiftReal(), and QFFT::ZeroPad().
| const QVectorC & QVectorC::ShiftReal | ( | const double | fstep | ) |
Cyclic shift of vector by a real number, first shift by the integer part of fstep then linear interpolation between samples is performed.
| fstep | if > 0 shift right, if < 0 shift left |
Definition at line 258 of file QVectorC.cc.
|
inline |
size of QVector
Definition at line 82 of file QVectorC.hh.
Referenced by Append(), QMatrixC::CholeskySolveX(), Conjugate(), Div(), GetMagnitudes(), GetMagnitudesSquare(), GetPhase(), H(), Initialize(), Mult(), MultIn(), operator*(), operator=(), operator[](), QVectorC(), QVectorCConstView::QVectorCConstView(), QVectorCView::QVectorCView(), Rebin(), Resize(), SetIm(), SetRe(), Shift(), ShiftReal(), and QFFT::ZeroPad().