11 #include <gsl/gsl_vector.h>
12 #include <gsl/gsl_vector_complex_double.h>
35 explicit QVectorC(
const UInt_t size);
77 void SetArray(
const double* re,
const double* im, UInt_t size);
82 inline UInt_t
Size()
const {
return fSize/2;};
87 void Initialize(
const double re = 0,
const double im =0);
306 void Resize(
const UInt_t newsize);
314 void Append(
const double re,
const double im=0);
329 double Norma()
const;
332 QComplex Sum(UInt_t nelem, UInt_t first = 0)
const;
416 QVector &InterleavedVector()
const;
424 QVectorC GetSubVector(UInt_t
N,UInt_t start=0,UInt_t stride=1);
431 const QVectorC GetSubVector(UInt_t
N,UInt_t start=0,UInt_t stride=1)
const;
433 void Print(
const char *opts=
"")
const;
441 QVectorC(gsl_complex *data,
const UInt_t size,
const UInt_t Stride);
446 static void ArrayCopy(
const gsl_complex* orig,
const UInt_t origStride,
447 gsl_complex *dest,
const UInt_t destStride,
451 mutable gsl_vector_complex* fMathVec;
478 void SetMathVector()
const;
479 void SetParts()
const;
480 void InitCopy(
const QVectorC& orig,
const bool copyData);
496 Diana::QVectorC
operator*(
double t,
const Diana::QVectorC&v);
498 std::ostream&
operator<<(std::ostream&s,
const Diana::QVectorC& v);
502 const Diana::QVector
Re(
const Diana::QVectorC &Z);
506 const Diana::QVector
Im(
const Diana::QVectorC &Z);
#define Q_BEGIN_NAMESPACE
#define QObjectDef(clazz, id)
std::ostream & operator<<(std::ostream &s, const Diana::QVectorC &v)
const Diana::QVector Im(const Diana::QVectorC &Z)
Get the imag part of the vector.
const Diana::QVector Re(const Diana::QVectorC &Z)
Get the real part of the vector.
Q_END_NAMESPACE Diana::QVectorC operator*(double t, const Diana::QVectorC &v)
Interface to FFTW's FFT plans.
An array of complex matrices that have been laid out in memory.
Interface for complex matrices in Diana analysis.
base class for objects handled by QEvent and QGlobalDataManager.
virtual void Print() const
print content on screen
Real to complex FFT using FFTW3.
QVectorCView for const QVectorC.
subview of an existing QVectorC, useful to operate on a QVectorC slice
Interface for complex vectors in Diana analysis.
void SetArray(const double *re, const double *im, UInt_t size)
const QVectorC & DivIn(const QVectorC &other)
division element by element by the given vector
QVector GetMagnitudesSquare() const
QVectorC operator+(const QVectorC &other) const
sum vector
const QVectorC & ShiftReal(const double fstep)
Cyclic shift of vector by a real number, first shift by the integer part of fstep then linear interpo...
const QVectorC & operator+=(const QVectorC &v)
QVector GetModulus() const
QVectorC operator-() const
revert sign to all components
QMatrixC H() const
transpose conjugate
const QVectorC & operator*=(const double t)
multiplication by scalar
QVectorC()
default constructor
QVectorC operator/(const double t) const
divide by scalar
void Resize(const UInt_t newsize)
const QVectorC & Shift(const int nstep)
Cyclic shift of vector.
void Initialize(const double re=0, const double im=0)
initialize elements (default to 0)
QComplex operator*(const QVectorC &other) const
complex conjugate scalar product (v^H * u)
void SetRe(const QVector &re)
Set real part.
const QVectorC & operator=(const QVectorC &orig)
copy the content of another vector
QVectorC Mult(const QVectorC &other) const
multiplication element by element
UInt_t Size() const
size of QVector
QVectorC Div(const QVectorC &other) const
multiplication element by element
~QVectorC()
copy only some of the elements
void SetIm(const QVector &im)
Set imag part.
void Append(const QComplex &val)
append
const QVectorC & MultIn(const QVectorC &other)
multiplication element by element by the given vector
const QVectorC & operator/=(const double v)
divide by scalar
QComplex operator()(const UInt_t i)
QComplex operator[](const UInt_t i)
retrieve an element
QVector GetMagnitudes() const
QVector GetModulusSquare() const
const QVectorC & operator-=(const QComplex &t)
add a QVectorC
const QVectorC & Rebin(const int rebin, bool sum=false)
Rebin the vector.
void Clear()
clear the vector
Interface for vectors in Diana analysis.