Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

TDSPVector Class Reference

#include <TDSPVector.h>

Inheritance diagram for TDSPVector:

TDSPMatrix TDSPSignal TDSPStochasticSignal

Public Member Functions

Int_t Lo () const
Int_t Hi () const
void Swap (Int_t, Int_t)
 Swap two elements.

TComplexElement (Int_t i)
TComplexGetVec ()
TComplexMoveVec (Int_t n)
Int_t GetLen () const
Double_t GetTime ()
void Free ()
 Free all resources used by this vector.

Int_t GetZero ()
void SetZero (Int_t z)
void SetVec (TComplex *s, Int_t num=-1)
 Set the pointer to extern data.

void ResetSignal ()
virtual void SetLen (Int_t num, Bool_t savedata=kFALSE)
 Set the size.

void SetMinLen (Int_t num)
 Set the minimum size to alloc.

void Set (const TComplex &)
 Set all values to c.

void Set (Double_t)
 Set all values to c.

void Set (Int_t i, TDSPVector *, Int_t p=0, Int_t len=-1)
 Set the values starting from i from vector at p..p+len-1.

void SetReal (Double_t)
 Set all real parts to c.

void SetImag (Double_t)
 Set all imag parts to c.

void Zeros ()
void Ones ()
void Delta (Int_t pos=0)
void Step (TComplex &start, TComplex &step)
 Init with start,start+step,start+2*step etc.

void Step (TComplex &start)
 Init with start,start+1,start+2 etc.

void Step (Double_t start, Double_t step=1.0)
 Init with start,start+step,start+2*step etc.

void Step ()
 Init with 0,1,2,3 ...

void ConjugateMe ()
 Conjugate all elements.

void AdjointMe ()
 Adjoint the vector.

TDSPVectorAdjoint (TDSPVector *out=NULL)
 Adjoint the vector.

void Append (TDSPVector *)
 Append a vector to this vector.

Double_t Dist (TDSPVector *)
 Calculate the Distance.

Double_t Dist (TDSPVector &)
 Calculate the Distance.

Double_t Dist2 (TDSPVector *)
 Calculate the Distance^2.

Double_t Dist2 (TDSPVector &)
 Calculate the Distance^2.

TComplex Dot (TDSPVector *, Bool_t conj=kTRUE)
 Calculate the Dot-Product - conjugate (this) before ?

TComplex Dot (TDSPVector &, Bool_t conj=kTRUE)
 Calculate the Dot-Product - conjugate (this) before ?

Double_t Dot2 (TDSPVector *)
 Calculate the Dot-Product^2.

Double_t Dot2 (TDSPVector &)
 Calculate the Dot-Product^2.

void RandN (Double_t mean=0, Double_t sigma=1)
 real parts normal dist. with (mean,sigma=1) and imag=0

void RandNreal (Double_t mean=0, Double_t sigma=1)
 real parts normal dist. with (mean,sigma=1)

void RandNimag (Double_t mean=0, Double_t sigma=1)
 imag parts normal dist. with (mean,sigma=1)

void RandNC (Double_t sigma=1)
 real/imag cnormal dist. with (sigma=1) and mean=0

void RandNC (TComplex &, Double_t sigma=1)
 real/imag cnormal dist. with (mean,sigma=1)

void RandNC (TComplex *, Double_t sigma=1)
 real/imag cnormal dist. with individ. (means,sigma=1)

void RandNC (TComplex *, TComplex *sigmas)
 real/imag cnormal dist. with individ. (means,sigmas)

void RandNC (TDSPVector *, Double_t sigma=1)
 real/imag cnormal dist. with individ. (means,sigma=1)

void RandNC (TDSPVector &, Double_t sigma=1)
 real/imag cnormal dist. with individ. (means,sigma=1)

void RandNC (TDSPVector *, TDSPVector *sigmas)
 real/imag cnormal dist. with individ. (means,sigmas)

void RandPhase ()
 init as random phasors (uniform phase ...)

void MultRandPhase (TDSPVector *in=NULL)
 init with random phase multiplied on an input vector(if NULL use this).

void RandNPhase (Double_t variance=1, Double_t rate=1)
 init with random normal phases at a special rate

void MultRandNPhase (Double_t variance=1, Double_t rate=1)
 multiply with random phase

void MultRandNPhase (Double_t variance, Double_t rate, TDSPVector *)
 init with random phase multiplied on an input vector.

void Reverse ()
 Reverse the order.

void RandRayleigh (Double_t sigma=1, Double_t phase=0)
 init with real rayleigh

void ModulateMe (TComplex, Double_t burstlen=0, Double_t burstoff=0, Double_t phase=0)
 Modulate the vector (multiply with a frequency).

TDSPVectorModulate (TComplex, Double_t burstlen=0, Double_t burstoff=0, Double_t phase=0, TDSPVector *=NULL)
 Modulate the vector (reset phase after each burstlen steps).

TDSPVectorDownSampling (UInt_t M, TDSPVector *pulse=NULL, TDSPVector *output=NULL)
 M-fold decimation filter with response "pulse".

TDSPVectorUpSampling (UInt_t K, TDSPVector *pulse=NULL, TDSPVector *output=NULL, UInt_t iStep=1, UInt_t iOff=0)
 K-fold interpolation filter with response "pulse".

TDSPVectorAlias (TDSPVector *a=NULL, Int_t NewLen=0)
 Creates an Alias to this vector of Length NewLen.

TComplex Sum (TDSPVector *weights=NULL)
 The Sum.

Double_t Sum2 (TDSPVector *weights=NULL)
 The Sum of squares abs.

TComplex Prod ()
 the product of all components

Double_t ProdReal ()
 the product of all components real part

Double_t ProdImag ()
 the product of all components imag part

Double_t Norm (TDSPVector *weights=NULL, Int_t p=2)
 Calculate the weighted p-Norm (default=2-norm).

Double_t Norm2 (TDSPVector *weights=NULL)
Double_t Energy ()
Double_t Power ()
TComplex Mean (TDSPVector *weights=NULL)
 Calculate the Mean.

Double_t Mean2 (TDSPVector *weights=NULL)
 Calculate the Mean2.

Double_t Variance (TDSPVector *weights=NULL)
 Calculate the Variance.

Double_t Moment1 (TDSPVector *x=NULL)
 1.Moment = 1/norm2(x)*sum_i Abs2(this(i))*Abs(x(i)) (x=NULL-->x=i)

Double_t Moment2 (TDSPVector *x=NULL)
 2.Moment = 1/norm2(x)*sum_i Abs2(this(i))*Abs2(x(i)) (x=NULL-->x=i)

Double_t CMoment2 (TDSPVector *x=NULL)
 2.CentralMoment = 1/norm2(x)*sum_i Abs2(this(i))*(Abs2(x(i))-xmean) (x=NULL-->x=i)

Double_t Max ()
Double_t Min ()
Double_t MaxReal ()
 Return the maximum real part.

Double_t MinReal ()
 Return the minimum real part.

Double_t MaxImag ()
 Return the maximum imag part.

Double_t MinImag ()
 Return the minimum imag part.

Double_t MaxAbs2 ()
 Return the maximum squared abs.

Double_t MinAbs2 ()
 Return the minimum squared abs.

Double_t MaxAbs ()
Double_t MinAbs ()
TDSPVectorGetPhase (TDSPVector *resul=NULL)
 return the phases of the vector in a new vector

void Phase ()
 set the vector to its phases

void Sqr ()
 Square the vector-abs : c^* * c.

void Abs2 ()
void Abs ()
 Absolute value per index of the vector c^t*c.

void Sqrt ()
 Square Root of the Vector.

void SqrtReal ()
 Square Root only on the real part of the Vector.

void SqrtImag ()
 Square Root only on the imaginary part of the Vector.

void Exp ()
 Exp of the Vector.

void Cos ()
 Cosine of the Vector.

void Sin ()
 Sine of the Vector.

void Log ()
 nat. Log of the vector

void Log10 ()
 10-Log of the vector

void Log2 ()
 2-Log of the vector

void Normalize (Double_t norm=1.0)
 Normalize.

TDSPVectorDup ()
TDSPVectorCopy (TDSPVector *n)
 Copy the Vector to n (=NULL - create a new vector ).

void Apply (TComplex(*fcn)(TComplex &))
 Apply a Function on the signal vector.

void SetSamplingRate (Double_t s)
Double_t GetSamplingRate ()
void SamplingRate (Double_t s)
void Configure (TDSPVector *)
 Configure the signal on the base on an other signal.

void SetXTitle (char *name)
 Set the name of the xtitle.

void SetYTitle (char *name)
 Set the name of the ytitle.

Int_t OnCodeInc (TDSPVector *Alphabet)
 Increments this(seen a sequence of complex number) to the next codeword.

Int_t OnCodeInc (TComplex *Alphabet, Int_t NumAlphabet)
 Increments this (seen a sequence of complex number) to the next codeword.

Int_t OnCodeSet (Int_t value, TDSPVector *al)
 Codes the value in the Vector based on the alphabet "al".

Int_t OnCodeSet (Int_t value, TComplex *al, Int_t num_al)
 Codes the value in the Vector based on the alphabet "al".

Int_t OnCodeGet (Int_t *value, TDSPVector *al)
 Decodes the vector based on the alphabet "al" to *value.

Int_t OnCodeGet (Int_t *value, TComplex *al, Int_t num_al)
 Decodes the Vector based on the alphabet "al" to *value.

TDSPVectorDivBy (TDSPVector *a, TDSPVector *result=NULL)
 Some Pointwise operations.

TDSPVectorMultBy (TDSPVector *a, TDSPVector *result=NULL)
TDSPVectorAddBy (TDSPVector *a, TDSPVector *result=NULL)
TDSPVectorSubBy (TDSPVector *a, TDSPVector *result=NULL)
TDSPVectorDivBy (TComplex a, TDSPVector *result=NULL)
 Some Scalar operations.

TDSPVectorMultBy (TComplex a, TDSPVector *result=NULL)
TDSPVectorAddBy (TComplex a, TDSPVector *result=NULL)
TDSPVectorSubBy (TComplex a, TDSPVector *result=NULL)
TDSPVectorConv (TDSPVector *input, TDSPVector *output=NULL, Int_t opt=kTDSPVector_Conv_Defaults, Int_t b=0)
 Convolution.

void DumpParams (ostream *os=NULL)
void FFTShiftMe ()
 Rearrange after fft / before ifft (moving the zero-freq to the center).

void IFFTShiftMe ()
 Rearrange after ifft / before fft (moving the zero-freq to the center).

TDSPVectorXCorr (Int_t max_lags=0, eXCorr_Options o=kXCorrNone)
TDSPVectorXCorr (TDSPVector *i2, Int_t max_lags=0, eXCorr_Options o=kXCorrNone)
TDSPVectorXCorr (TDSPVector *i2, TDSPVector *result, Int_t max_lags=0, eXCorr_Options o=kXCorrNone)
TGraph * Graph (Option_t *="complex", TGraph *in=NULL, Double_t dx=1.0, Double_t xoff=0.0)
virtual void Draw (Option_t *="ac", Double_t dx=1.0, Double_t xoff=0.0)
TH1 * FillAbs (TH1 *h=NULL)
TH1 * FillAbs2 (TH1 *h=NULL)
TH1 * FillPhase (TH1 *h=NULL)
TH1 * FillReal (TH1 *h=NULL)
TH1 * FillImag (TH1 *h=NULL)
TH2 * Fill (TH2 *h=NULL)
virtual void Print (Option_t *option="")
void Input ()
TDSPVectoroperator= (TmxArray &m)
 some operators

TDSPVectoroperator= (const Double_t x)
TDSPVectoroperator= (TDSPVector &x)
TDSPVectoroperator= (const TComplex &c)
TDSPVectoroperator &= (const Double_t &)
TDSPVectoroperator/= (const TComplex &d)
 Add a value into the Vector and move the cursor.

TDSPVectoroperator/= (const Double_t &d)
TDSPVectoroperator/= (const Int_t &d)
TDSPVectoroperator *= (const TComplex &d)
TDSPVectoroperator *= (const Double_t &d)
TDSPVectoroperator *= (const Int_t &d)
TDSPVectoroperator+= (const TComplex &d)
TDSPVectoroperator+= (const Double_t &d)
TDSPVectoroperator+= (const Int_t &d)
TDSPVectoroperator-= (const TComplex &d)
TDSPVectoroperator-= (const Double_t &d)
TDSPVectoroperator-= (const Int_t &d)
TDSPVectoroperator+= (const TDSPVector &s)
TDSPVectoroperator-= (const TDSPVector &s)
TDSPVectoroperator *= (const TDSPVector &s)
TComplexoperator() (Int_t index)
TComplexoperator[] (Int_t index)
void Save (TFile *f, char *key)
 Save a Vector into a file/key.

void Save (char *fname, char *key, char *opt="RECREATE")
 Save a Vector into a file/key.

 TDSPVector (Int_t len=0)
virtual ~TDSPVector ()

Static Public Member Functions

Bool_t LoadATLAS (char *name=NULL)
 loads the atlas library

void EnableATLAS ()
 disable the use of the atlas library

void DisableATLAS ()
Bool_t UsingATLAS ()
TDSPVectorLoad (TFile *f, char *key)
 Load a Vector from a file/key.

TDSPVectorLoad (char *fname, char *key)
 Load a Vector from a file/key.

void ValuesPerLine (UInt_t p)

Protected Attributes

char * fXTitle
 A name for the vector index.

char * fYTitle
 A name for the vector content.

TComplexfVec
Int_t Num
 Len of signal vectorm.

Int_t fPos
 mom. position for pointwise filling etc.

TComplexfAllocedVec
Int_t fAllocedNum
Double_t fSamplingRate
 The Sampling Rate.

Int_t fZero
 for absolut positioning (=pos of the zero)


Static Protected Attributes

UInt_t fStrict
 Strictmode 0=none,1=warning,2=strict.

Bool_t fATLAS

Friends

Bool_t operator== (TDSPVector &, TDSPVector &)
 How many Values to Print per line (using cout...).

istream & operator>> (istream &, TDSPVector &)
ostream & operator<< (ostream &, TDSPVector &)
istream & operator>> (istream &, TDSPVector *)
ostream & operator<< (ostream &, TDSPVector *)
Double_t filternorm (TDSPVector *fir, TDSPVector *iir=NULL, UInt_t p=2)
TDSPVectorfilter (TDSPVector *in, TDSPVector *out, TDSPVector *fir, TDSPVector *iir=NULL)
void mult (TDSPVector *a, TDSPVector *b, TDSPVector *c)
void econv (TDSPVector *a, TDSPVector *b, TDSPVector *c, Int_t offset=0, Int_t step=1, Int_t opt=kTDSPVector_Conv_Defaults)

Constructor & Destructor Documentation

TDSPVector::TDSPVector Int_t  len = 0  ) 
 

Referenced by Adjoint(), Alias(), Copy(), and TDSPMatrix::GetDiag().

virtual TDSPVector::~TDSPVector  )  [virtual]
 


Member Function Documentation

void TDSPVector::Abs  )  [inline]
 

Absolute value per index of the vector c^t*c.

Definition at line 575 of file TDSPVector.h.

References fVec, and Num.

00575                             {
00576   for(register Int_t i=0;i<Num;++i) 
00577     fVec[i]= ::Abs(fVec[i]);
00578 }

void TDSPVector::Abs2  )  [inline]
 

Definition at line 212 of file TDSPVector.h.

References Sqr().

00212 { Sqr();};                             

TDSPVector* TDSPVector::AddBy TComplex  a,
TDSPVector result = NULL
 

TDSPVector* TDSPVector::AddBy TDSPVector a,
TDSPVector result = NULL
 

TDSPVector * TDSPVector::Adjoint TDSPVector out = NULL  )  [inline]
 

Adjoint the vector.

Definition at line 483 of file TDSPVector.h.

References Configure(), TComplex::fIm, TComplex::fRe, fVec, Num, SetLen(), and TDSPVector().

00483                                                       {
00484   if (!out) out = new TDSPVector();
00485   out->SetLen(Num);
00486   for(register Int_t i=0;i<Num;++i) {
00487     out->fVec[i].fRe=fVec[i].fRe;
00488     out->fVec[i].fIm=fVec[i].fIm * -1.0;
00489   }
00490   out->Configure(this);
00491   return out;
00492 }

void TDSPVector::AdjointMe  )  [inline]
 

Adjoint the vector.

Definition at line 479 of file TDSPVector.h.

References TComplex::fIm, fVec, and Num.

00479                                   {
00480   for(register Int_t i=0;i<Num;++i) fVec[i].fIm *= -1.0;
00481 }

TDSPVector * TDSPVector::Alias TDSPVector a = NULL,
Int_t  NewLen = 0
[inline]
 

Creates an Alias to this vector of Length NewLen.

Definition at line 744 of file TDSPVector.h.

References Configure(), Free(), fVec, Num, SetVec(), and TDSPVector().

00744                                                                 {
00745   if (!a) a = new TDSPVector();
00746   a->Free();
00747   a->Configure(this);
00748   if (!NewNum) NewNum=Num;
00749   a->SetVec(fVec,NewNum);
00750   return a;
00751 }

void TDSPVector::Append TDSPVector  ) 
 

Append a vector to this vector.

void TDSPVector::Apply TComplex(*  fcn)(TComplex &)  )  [inline]
 

Apply a Function on the signal vector.

Definition at line 721 of file TDSPVector.h.

References fVec, and Num.

00721                                                         {
00722   
00723   for(register Int_t i=0;i<Num;++i)  
00724     fVec[i] = (*fcn)(fVec[i]);
00725 
00726 }

Double_t TDSPVector::CMoment2 TDSPVector x = NULL  ) 
 

2.CentralMoment = 1/norm2(x)*sum_i Abs2(this(i))*(Abs2(x(i))-xmean) (x=NULL-->x=i)

void TDSPVector::Configure TDSPVector  )  [inline]
 

Configure the signal on the base on an other signal.

Definition at line 753 of file TDSPVector.h.

References GetSamplingRate(), and SetSamplingRate().

Referenced by Adjoint(), Alias(), TDSPFunction::Apply(), Copy(), and TDSPModulation::Modulate().

00753                                                {
00754   SetSamplingRate(s->GetSamplingRate());
00755 }

void TDSPVector::ConjugateMe  ) 
 

Conjugate all elements.

TDSPVector* TDSPVector::Conv TDSPVector input,
TDSPVector output = NULL,
Int_t  opt = kTDSPVector_Conv_Defaults,
Int_t  b = 0
 

Convolution.

Referenced by Conv().

TDSPVector * TDSPVector::Copy TDSPVector n  )  [inline]
 

Copy the Vector to n (=NULL - create a new vector ).

Definition at line 728 of file TDSPVector.h.

References Configure(), fVec, GetVec(), Num, SetLen(), and TDSPVector().

Referenced by Dup(), and operator=().

00728                                                       {
00729   
00730   if (!output) output = new TDSPVector();
00731 
00732   output->SetLen(Num);
00733   TComplex *ovec = output->GetVec();
00734 
00735   for(register Int_t i=0;i<Num;++i)  
00736     ovec[i] = fVec[i];
00737 
00738   output->Configure(this);
00739 
00740   return output;
00741 
00742 }

void TDSPVector::Cos  )  [inline]
 

Cosine of the Vector.

Definition at line 601 of file TDSPVector.h.

References fVec, and Num.

00601                             {
00602   for(register Int_t i=0;i<Num;++i) 
00603     fVec[i]= ::Cos(fVec[i]);
00604 }

void TDSPVector::Delta Int_t  pos = 0  )  [inline]
 

Definition at line 128 of file TDSPVector.h.

References Zeros().

00128 { Zeros(); (*this)(pos)=1;  };

void TDSPVector::DisableATLAS  )  [inline, static]
 

Definition at line 103 of file TDSPVector.h.

References fATLAS.

00103 { fATLAS=kFALSE;}; 

Double_t TDSPVector::Dist TDSPVector  )  [inline]
 

Calculate the Distance.

Definition at line 646 of file TDSPVector.h.

References Dist().

00646                                               {
00647   return Dist(&s);
00648 }

Double_t TDSPVector::Dist TDSPVector  )  [inline]
 

Calculate the Distance.

Definition at line 643 of file TDSPVector.h.

References Dist2(), and Sqrt().

Referenced by Dist(), and Dist().

00643                                               {
00644   return TMath::Sqrt(Dist2(s));
00645 }

Double_t TDSPVector::Dist2 TDSPVector  )  [inline]
 

Calculate the Distance^2.

Definition at line 640 of file TDSPVector.h.

References Dist2().

00640                                                {
00641   return Dist2(&s);
00642 }

Double_t TDSPVector::Dist2 TDSPVector  ) 
 

Calculate the Distance^2.

Referenced by Dist(), Dist2(), and Dist2().

TDSPVector* TDSPVector::DivBy TComplex  a,
TDSPVector result = NULL
 

Some Scalar operations.

TDSPVector* TDSPVector::DivBy TDSPVector a,
TDSPVector result = NULL
 

Some Pointwise operations.

TComplex TDSPVector::Dot TDSPVector ,
Bool_t  conj = kTRUE
[inline]
 

Calculate the Dot-Product - conjugate (this) before ?

Definition at line 666 of file TDSPVector.h.

References Dot().

00666                                                           {
00667   return Dot(&s,conj);
00668 }

TComplex TDSPVector::Dot TDSPVector ,
Bool_t  conj = kTRUE
[inline]
 

Calculate the Dot-Product - conjugate (this) before ?

Definition at line 653 of file TDSPVector.h.

References fVec, GetSamplingRate(), and Num.

Referenced by Dot(), and Dot().

00653                                                           {
00654   if (s->GetSamplingRate()!=GetSamplingRate()) 
00655     Warning("Dot","Sampling rates differ (%f != %f) !",GetSamplingRate(),s->GetSamplingRate());
00656   
00657   TComplex dot=0;
00658   if (conj) 
00659     for(register Int_t i=0;i<Num;++i) 
00660       dot  += fVec[i] % s->fVec[i];
00661   else 
00662     for(register Int_t i=0;i<Num;++i) 
00663       dot  += fVec[i] * s->fVec[i];
00664   return dot;
00665 }

Double_t TDSPVector::Dot2 TDSPVector  )  [inline]
 

Calculate the Dot-Product^2.

Definition at line 650 of file TDSPVector.h.

References Dot2().

00650                                               {
00651   return Dot2(&s);
00652 }

Double_t TDSPVector::Dot2 TDSPVector  )  [inline]
 

Calculate the Dot-Product^2.

Definition at line 630 of file TDSPVector.h.

References TComplex::fIm, TComplex::fRe, fVec, GetSamplingRate(), and Num.

Referenced by Dot2(), and Dot2().

00630                                               {
00631   Double_t dot2=0;
00632   if (s->GetSamplingRate()!=GetSamplingRate()) 
00633     Warning("Dot2","Sampling rates differ (%f != %f) !",GetSamplingRate(),s->GetSamplingRate());
00634   for(register Int_t i=0;i<Num;++i) {
00635     dot2  += fVec[i].fRe*s->fVec[i].fRe + fVec[i].fIm*s->fVec[i].fIm;
00636   }
00637   
00638   return dot2;
00639 }

TDSPVector* TDSPVector::DownSampling UInt_t  M,
TDSPVector pulse = NULL,
TDSPVector output = NULL
 

M-fold decimation filter with response "pulse".

virtual void TDSPVector::Draw Option_t *  = "ac",
Double_t  dx = 1.0,
Double_t  xoff = 0.0
[virtual]
 

void TDSPVector::DumpParams ostream *  os = NULL  ) 
 

TDSPVector* TDSPVector::Dup  )  [inline]
 

Reimplemented in TDSPMatrix.

Definition at line 224 of file TDSPVector.h.

References Copy().

00224 { return Copy(NULL);};                

TComplex& TDSPVector::Element Int_t  i  )  [inline]
 

Definition at line 109 of file TDSPVector.h.

References fVec.

Referenced by TDSPMatrix::GetDiag().

00109 { return fVec[i];};       

void TDSPVector::EnableATLAS  )  [inline, static]
 

disable the use of the atlas library

Definition at line 102 of file TDSPVector.h.

References fATLAS.

Double_t TDSPVector::Energy  )  [inline]
 

Definition at line 186 of file TDSPVector.h.

References fSamplingRate, and Norm2().

00186 { return Norm2()/fSamplingRate;};    

void TDSPVector::Exp  )  [inline]
 

Exp of the Vector.

Definition at line 585 of file TDSPVector.h.

References fVec, and Num.

00585                             {
00586   for(register Int_t i=0;i<Num;++i) 
00587     fVec[i]= ::Exp(fVec[i]);
00588 }

void TDSPVector::FFTShiftMe  ) 
 

Rearrange after fft / before ifft (moving the zero-freq to the center).

TH2* TDSPVector::Fill TH2 *  h = NULL  ) 
 

TH1* TDSPVector::FillAbs TH1 *  h = NULL  ) 
 

TH1* TDSPVector::FillAbs2 TH1 *  h = NULL  ) 
 

TH1* TDSPVector::FillImag TH1 *  h = NULL  ) 
 

TH1* TDSPVector::FillPhase TH1 *  h = NULL  ) 
 

TH1* TDSPVector::FillReal TH1 *  h = NULL  ) 
 

void TDSPVector::Free  ) 
 

Free all resources used by this vector.

Referenced by Alias().

Int_t TDSPVector::GetLen  )  const [inline]
 

Definition at line 112 of file TDSPVector.h.

References Num.

Referenced by TDSPFunction::Apply(), operator==(), TDSPSolver::SetXAlphabet(), TDSPBlockFifo::Shift(), Std(), and TDSPOutput1::Update().

00112 { return Num; };            

TDSPVector* TDSPVector::GetPhase TDSPVector resul = NULL  ) 
 

return the phases of the vector in a new vector

Double_t TDSPVector::GetSamplingRate  )  [inline]
 

Definition at line 228 of file TDSPVector.h.

References fSamplingRate.

Referenced by TDSPFunction::Apply(), Configure(), Dot(), Dot2(), and operator==().

00228 { return fSamplingRate; };

Double_t TDSPVector::GetTime  )  [inline]
 

Definition at line 113 of file TDSPVector.h.

References fSamplingRate, and Num.

00113 { return Num/fSamplingRate;};    

TComplex* TDSPVector::GetVec  )  [inline]
 

Definition at line 110 of file TDSPVector.h.

References fVec.

Referenced by TDSPFunction::Apply(), Copy(), TDSPMatrix::Copy(), operator==(), TDSPSolver::SetXAlphabet(), TDSPBlockFifo::Shift(), and TDSPOutput1::Update().

00110 { return fVec; };                 

Int_t TDSPVector::GetZero  )  [inline]
 

Definition at line 115 of file TDSPVector.h.

References fZero.

00115 { return fZero; };               

TGraph* TDSPVector::Graph Option_t *  = "complex",
TGraph *  in = NULL,
Double_t  dx = 1.0,
Double_t  xoff = 0.0
 

Int_t TDSPVector::Hi  )  const [inline]
 

Definition at line 107 of file TDSPVector.h.

References Num.

00107 { return Num-1;};               

void TDSPVector::IFFTShiftMe  ) 
 

Rearrange after ifft / before fft (moving the zero-freq to the center).

void TDSPVector::Input  ) 
 

Reimplemented in TDSPMatrix.

Int_t TDSPVector::Lo  )  const [inline]
 

Definition at line 106 of file TDSPVector.h.

00106 { return 0;};                   

TDSPVector* TDSPVector::Load char *  fname,
char *  key
[static]
 

Load a Vector from a file/key.

TDSPVector* TDSPVector::Load TFile *  f,
char *  key
[static]
 

Load a Vector from a file/key.

Bool_t TDSPVector::LoadATLAS char *  name = NULL  )  [static]
 

loads the atlas library

void TDSPVector::Log  )  [inline]
 

nat. Log of the vector

Definition at line 589 of file TDSPVector.h.

References fVec, and Num.

00589                             {
00590   for(register Int_t i=0;i<Num;++i) 
00591     fVec[i]= ::Log(fVec[i]);
00592 }

void TDSPVector::Log10  )  [inline]
 

10-Log of the vector

Definition at line 593 of file TDSPVector.h.

References fVec, and Num.

00593                               {
00594   for(register Int_t i=0;i<Num;++i) 
00595     fVec[i]= ::Log10(fVec[i]);
00596 }

void TDSPVector::Log2  )  [inline]
 

2-Log of the vector

Definition at line 597 of file TDSPVector.h.

References fVec, and Num.

00597                              {
00598   for(register Int_t i=0;i<Num;++i) 
00599     fVec[i]= ::Log2(fVec[i]);
00600 }

Double_t TDSPVector::Max  )  [inline]
 

Definition at line 195 of file TDSPVector.h.

References MaxReal().

00195 { return MaxReal();};      

Double_t TDSPVector::MaxAbs  )  [inline]
 

Definition at line 206 of file TDSPVector.h.

References MaxAbs2(), and Sqrt().

00206 { return TMath::Sqrt(MaxAbs2());};   

Double_t TDSPVector::MaxAbs2  )  [inline]
 

Return the maximum squared abs.

Definition at line 784 of file TDSPVector.h.

References TComplex::fIm, TComplex::fRe, fVec, and Num.

Referenced by MaxAbs().

00784                                     {
00785   Double_t max = fVec->fIm*fVec->fIm+fVec->fRe*fVec->fRe;
00786   Double_t m   = 0;
00787   for(register Int_t i=1;i<Num;++i) 
00788     if ((m=fVec[i].fIm*fVec[i].fIm+fVec[i].fRe*fVec[i].fRe)>max) max=m;
00789   return max;
00790 }

Double_t TDSPVector::MaxImag  )  [inline]
 

Return the maximum imag part.

Definition at line 771 of file TDSPVector.h.

References TComplex::fIm, fVec, and Num.

00771                                     {
00772   Double_t max = fVec->fIm;
00773   Double_t m   = 0;
00774   for(register Int_t i=1;i<Num;++i) if ((m=fVec[i].fIm)>max) max=m;
00775   return max;
00776 }

Double_t TDSPVector::MaxReal  )  [inline]
 

Return the maximum real part.

Definition at line 758 of file TDSPVector.h.

References TComplex::fRe, fVec, and Num.

Referenced by Max().

00758                                     {
00759   Double_t max = fVec->fRe;
00760   Double_t m   = 0;
00761   for(register Int_t i=1;i<Num;++i) if ((m=fVec[i].fRe)>max) max=m;
00762   return max;
00763 }

TComplex TDSPVector::Mean TDSPVector weights = NULL  )  [inline]
 

Calculate the Mean.

Definition at line 806 of file TDSPVector.h.

References Norm2(), Num, and Sum().

00806                                                     {
00807   if (weights) return Sum(weights)/weights->Norm2();
00808   return Sum(weights)/Num;
00809 }

Double_t TDSPVector::Mean2 TDSPVector weights = NULL  )  [inline]
 

Calculate the Mean2.

Definition at line 810 of file TDSPVector.h.

References Norm2(), Num, and Sum2().

00810                                                      {
00811   if (weights) return Sum2(weights)/weights->Norm2();
00812   return Sum2(weights)/Num;
00813 }

Double_t TDSPVector::Min  )  [inline]
 

Definition at line 196 of file TDSPVector.h.

References MinReal().

00196 { return MinReal();};      

Double_t TDSPVector::MinAbs  )  [inline]
 

Definition at line 207 of file TDSPVector.h.

References MinAbs2(), and Sqrt().

00207 { return TMath::Sqrt(MinAbs2());};   

Double_t TDSPVector::MinAbs2  )  [inline]
 

Return the minimum squared abs.

Definition at line 792 of file TDSPVector.h.

References TComplex::fIm, TComplex::fRe, fVec, and Num.

Referenced by MinAbs().

00792                                     {
00793   Double_t min = fVec->fIm*fVec->fIm+fVec->fRe*fVec->fRe;
00794   Double_t m   = 0;
00795   for(register Int_t i=1;i<Num;++i) 
00796     if ((m=fVec[i].fIm*fVec[i].fIm+fVec[i].fRe*fVec[i].fRe)<min) min=m;
00797   return min;
00798 }

Double_t TDSPVector::MinImag  )  [inline]
 

Return the minimum imag part.

Definition at line 778 of file TDSPVector.h.

References TComplex::fIm, fVec, and Num.

00778                                     {
00779   Double_t min = fVec->fIm;
00780   Double_t m   = 0;
00781   for(register Int_t i=1;i<Num;++i) if ((m=fVec[i].fIm)<min) min=m;
00782   return min;
00783 }

Double_t TDSPVector::MinReal  )  [inline]
 

Return the minimum real part.

Definition at line 765 of file TDSPVector.h.

References TComplex::fRe, fVec, and Num.

Referenced by Min().

00765                                     {
00766   Double_t min = fVec->fRe;
00767   Double_t m   = 0;
00768   for(register Int_t i=1;i<Num;++i) if ((m=fVec[i].fRe)<min) min=m;
00769   return min;
00770 }

TDSPVector* TDSPVector::Modulate TComplex  ,
Double_t  burstlen = 0,
Double_t  burstoff = 0,
Double_t  phase = 0,
TDSPVector = NULL
 

Modulate the vector (reset phase after each burstlen steps).

Referenced by TDSPModulation::Modulate().

void TDSPVector::ModulateMe TComplex  ,
Double_t  burstlen = 0,
Double_t  burstoff = 0,
Double_t  phase = 0
 

Modulate the vector (multiply with a frequency).

Double_t TDSPVector::Moment1 TDSPVector x = NULL  ) 
 

1.Moment = 1/norm2(x)*sum_i Abs2(this(i))*Abs(x(i)) (x=NULL-->x=i)

Double_t TDSPVector::Moment2 TDSPVector x = NULL  ) 
 

2.Moment = 1/norm2(x)*sum_i Abs2(this(i))*Abs2(x(i)) (x=NULL-->x=i)

TComplex* TDSPVector::MoveVec Int_t  n  )  [inline]
 

Definition at line 111 of file TDSPVector.h.

References fVec.

00111 { return fVec+=n;};       

TDSPVector* TDSPVector::MultBy TComplex  a,
TDSPVector result = NULL
 

TDSPVector* TDSPVector::MultBy TDSPVector a,
TDSPVector result = NULL
 

void TDSPVector::MultRandNPhase Double_t  variance,
Double_t  rate,
TDSPVector
 

init with random phase multiplied on an input vector.

void TDSPVector::MultRandNPhase Double_t  variance = 1,
Double_t  rate = 1
 

multiply with random phase

void TDSPVector::MultRandPhase TDSPVector in = NULL  ) 
 

init with random phase multiplied on an input vector(if NULL use this).

Double_t TDSPVector::Norm TDSPVector weights = NULL,
Int_t  p = 2
 

Calculate the weighted p-Norm (default=2-norm).

Referenced by Normalize().

Double_t TDSPVector::Norm2 TDSPVector weights = NULL  )  [inline]
 

Definition at line 184 of file TDSPVector.h.

References Sum2().

Referenced by Energy(), Mean(), Mean2(), and Power().

00184 { return Sum2(weights);};  

void TDSPVector::Normalize Double_t  norm = 1.0  )  [inline]
 

Normalize.

Definition at line 624 of file TDSPVector.h.

References Norm().

00624                                                {
00625   Double_t f = norm/Norm();
00626   (*this)*=f;
00627 }

Int_t TDSPVector::OnCodeGet Int_t *  value,
TComplex al,
Int_t  num_al
 

Decodes the Vector based on the alphabet "al" to *value.

Int_t TDSPVector::OnCodeGet Int_t *  value,
TDSPVector al
 

Decodes the vector based on the alphabet "al" to *value.

Int_t TDSPVector::OnCodeInc TComplex Alphabet,
Int_t  NumAlphabet
 

Increments this (seen a sequence of complex number) to the next codeword.

Int_t TDSPVector::OnCodeInc TDSPVector Alphabet  ) 
 

Increments this(seen a sequence of complex number) to the next codeword.

Int_t TDSPVector::OnCodeSet Int_t  value,
TComplex al,
Int_t  num_al
 

Codes the value in the Vector based on the alphabet "al".

Int_t TDSPVector::OnCodeSet Int_t  value,
TDSPVector al
 

Codes the value in the Vector based on the alphabet "al".

void TDSPVector::Ones  )  [inline]
 

Definition at line 127 of file TDSPVector.h.

References Set().

00127 { Set(1.0);};

TDSPVector & TDSPVector::operator &= const Double_t &   )  [inline]
 

Definition at line 372 of file TDSPVector.h.

References fPos, and fVec.

00372                                                            {
00373   fVec[fPos++] = d;
00374   return *this;
00375 }

TDSPVector& TDSPVector::operator *= const TDSPVector s  ) 
 

TDSPVector & TDSPVector::operator *= const Int_t &  d  )  [inline]
 

Definition at line 401 of file TDSPVector.h.

References fVec, and Num.

00401                                                         {
00402   for(register Int_t i=0;i<Num;++i) 
00403     fVec[i]*=d;
00404   return *this;
00405   
00406 }

TDSPVector & TDSPVector::operator *= const Double_t &  d  )  [inline]
 

Definition at line 395 of file TDSPVector.h.

References fVec, and Num.

00395                                                            {
00396   for(register Int_t i=0;i<Num;++i) 
00397     fVec[i]*=d;
00398   return *this;
00399 }

TDSPVector & TDSPVector::operator *= const TComplex d  )  [inline]
 

Definition at line 408 of file TDSPVector.h.

References fVec, and Num.

00408                                                            {
00409   for(register Int_t i=0;i<Num;++i) 
00410     fVec[i]*=d;
00411  
00412   return *this;
00413 }

TComplex & TDSPVector::operator() Int_t  index  )  [inline]
 

Definition at line 670 of file TDSPVector.h.

References ComplexZero, fVec, and Num.

00670                                                    {
00671   if (fVec) {
00672     if ((index<Num)&&(index>=0))
00673       return fVec[index];
00674     else 
00675       Error("operator()","index %d out of bounds (%d..%d)",index,0,Num-1);
00676   } else 
00677     Error("operator()","vector not allocated (this->fVec=0x0)!");
00678   return ComplexZero;
00679 }

TDSPVector& TDSPVector::operator+= const TDSPVector s  ) 
 

TDSPVector & TDSPVector::operator+= const Int_t &  d  )  [inline]
 

Definition at line 421 of file TDSPVector.h.

References fVec, and Num.

00421                                                         {
00422   for(register Int_t i=0;i<Num;++i) 
00423     fVec[i]+=d;
00424   return *this;
00425   
00426 }

TDSPVector & TDSPVector::operator+= const Double_t &  d  )  [inline]
 

Definition at line 415 of file TDSPVector.h.

References fVec, and Num.

00415                                                            {
00416   for(register Int_t i=0;i<Num;++i) 
00417     fVec[i]+=d;
00418   return *this;
00419 }

TDSPVector & TDSPVector::operator+= const TComplex d  )  [inline]
 

Definition at line 428 of file TDSPVector.h.

References fVec, and Num.

00428                                                            {
00429   for(register Int_t i=0;i<Num;++i) 
00430     fVec[i]+=d;
00431   return *this;
00432 }

TDSPVector& TDSPVector::operator-= const TDSPVector s  ) 
 

TDSPVector & TDSPVector::operator-= const Int_t &  d  )  [inline]
 

Definition at line 441 of file TDSPVector.h.

References fVec, and Num.

00441                                                         {
00442   for(register Int_t i=0;i<Num;++i) 
00443     fVec[i]-=d;
00444   return *this;
00445   
00446 }

TDSPVector & TDSPVector::operator-= const Double_t &  d  )  [inline]
 

Definition at line 435 of file TDSPVector.h.

References fVec, and Num.

00435                                                            {
00436   for(register Int_t i=0;i<Num;++i) 
00437     fVec[i]-=d;
00438   return *this;
00439 }

TDSPVector & TDSPVector::operator-= const TComplex d  )  [inline]
 

Definition at line 448 of file TDSPVector.h.

References fVec, and Num.

00448                                                            {
00449   for(register Int_t i=0;i<Num;++i) 
00450     fVec[i]-=d;
00451  
00452   return *this;
00453 }

TDSPVector & TDSPVector::operator/= const Int_t &  d  )  [inline]
 

Definition at line 383 of file TDSPVector.h.

References fVec, and Num.

00383                                                         {
00384   for(register Int_t i=0;i<Num;++i) 
00385     fVec[i]/=d;
00386   return *this;
00387   
00388 }

TDSPVector & TDSPVector::operator/= const Double_t &  d  )  [inline]
 

Definition at line 377 of file TDSPVector.h.

References fVec, and Num.

00377                                                            {
00378   for(register Int_t i=0;i<Num;++i) 
00379     fVec[i]/=d;
00380   return *this;
00381 }

TDSPVector & TDSPVector::operator/= const TComplex d  )  [inline]
 

Add a value into the Vector and move the cursor.

Definition at line 390 of file TDSPVector.h.

References fVec, and Num.

00390                                                            {
00391   for(register Int_t i=0;i<Num;++i) 
00392     fVec[i]/=d;
00393   return *this;
00394 }

TDSPVector& TDSPVector::operator= const TComplex c  )  [inline]
 

Definition at line 307 of file TDSPVector.h.

References Set().

00307 { Set(c); return *this;};

TDSPVector& TDSPVector::operator= TDSPVector x  )  [inline]
 

Definition at line 306 of file TDSPVector.h.

References Copy().

00306 { x.Copy(this);return *this;};

TDSPVector& TDSPVector::operator= const Double_t  x  )  [inline]
 

Definition at line 305 of file TDSPVector.h.

References Set().

00305 { Set(x); return *this;};

TDSPVector& TDSPVector::operator= TmxArray m  ) 
 

some operators

TComplex & TDSPVector::operator[] Int_t  index  )  [inline]
 

Definition at line 681 of file TDSPVector.h.

References fVec.

00681                                                    {
00682   return fVec[index];
00683 }

void TDSPVector::Phase  )  [inline]
 

set the vector to its phases

Definition at line 605 of file TDSPVector.h.

References fVec, Num, and TComplex::Phase.

00605                               {
00606   for(register Int_t i=0;i<Num;++i) 
00607     fVec[i]= fVec[i].Phase();
00608 }

Double_t TDSPVector::Power  )  [inline]
 

Definition at line 187 of file TDSPVector.h.

References Norm2(), and Num.

00187 {  return Num ? Norm2()/Num : 0;};    

virtual void TDSPVector::Print Option_t *  option = ""  )  [virtual]
 

Reimplemented in TDSPSignal.

TComplex TDSPVector::Prod  ) 
 

the product of all components

Double_t TDSPVector::ProdImag  ) 
 

the product of all components imag part

Double_t TDSPVector::ProdReal  ) 
 

the product of all components real part

void TDSPVector::RandN Double_t  mean = 0,
Double_t  sigma = 1
[inline]
 

real parts normal dist. with (mean,sigma=1) and imag=0

Definition at line 515 of file TDSPVector.h.

References TComplex::fIm, TComplex::fRe, fVec, and Num.

00515                                                            {
00516   for(register Int_t i=0;i<Num;++i) { 
00517     fVec[i].fRe = gRandom->Gaus(mean,sigma);
00518     fVec[i].fIm = 0;
00519   }
00520 }

void TDSPVector::RandNC TDSPVector ,
TDSPVector sigmas
 

real/imag cnormal dist. with individ. (means,sigmas)

void TDSPVector::RandNC TDSPVector ,
Double_t  sigma = 1
[inline]
 

real/imag cnormal dist. with individ. (means,sigma=1)

Definition at line 523 of file TDSPVector.h.

References RandNC().

00523                                                                 {
00524   RandNC(&means, sigma);
00525 }

void TDSPVector::RandNC TDSPVector ,
Double_t  sigma = 1
 

real/imag cnormal dist. with individ. (means,sigma=1)

void TDSPVector::RandNC TComplex ,
TComplex sigmas
 

real/imag cnormal dist. with individ. (means,sigmas)

void TDSPVector::RandNC TComplex ,
Double_t  sigma = 1
 

real/imag cnormal dist. with individ. (means,sigma=1)

void TDSPVector::RandNC TComplex ,
Double_t  sigma = 1
 

real/imag cnormal dist. with (mean,sigma=1)

void TDSPVector::RandNC Double_t  sigma = 1  ) 
 

real/imag cnormal dist. with (sigma=1) and mean=0

Referenced by TDSPStochasticSignal::ChangeRepresentation(), and RandNC().

void TDSPVector::RandNimag Double_t  mean = 0,
Double_t  sigma = 1
[inline]
 

imag parts normal dist. with (mean,sigma=1)

Definition at line 510 of file TDSPVector.h.

References TComplex::fIm, fVec, and Num.

00510                                                                {
00511   for(register Int_t i=0;i<Num;++i) 
00512     fVec[i].fIm = gRandom->Gaus(mean,sigma);
00513 }

void TDSPVector::RandNPhase Double_t  variance = 1,
Double_t  rate = 1
 

init with random normal phases at a special rate

void TDSPVector::RandNreal Double_t  mean = 0,
Double_t  sigma = 1
[inline]
 

real parts normal dist. with (mean,sigma=1)

Definition at line 505 of file TDSPVector.h.

References TComplex::fRe, fVec, and Num.

00505                                                                {
00506   for(register Int_t i=0;i<Num;++i) 
00507     fVec[i].fRe = gRandom->Gaus(mean,sigma);
00508 }

void TDSPVector::RandPhase  ) 
 

init as random phasors (uniform phase ...)

void TDSPVector::RandRayleigh Double_t  sigma = 1,
Double_t  phase = 0
[inline]
 

init with real rayleigh

Definition at line 557 of file TDSPVector.h.

References Cos(), TComplex::fIm, TComplex::fRe, fVec, Num, Sin(), Sqrt(), and TComplexBase.

Referenced by TDSPStochasticSignal::ChangeRepresentation().

00557                                                                    {
00558   TComplexBase tmp1,tmp2;
00559   for(register Int_t i=0;i<Num;++i) { 
00560     tmp1=gRandom->Gaus(0,sigma);
00561     tmp2=gRandom->Gaus(0,sigma);
00562     tmp1=TMath::Sqrt(tmp1*tmp1+tmp2*tmp2);
00563    
00564     fVec[i].fRe = TMath::Cos(phase)*tmp1;
00565     fVec[i].fIm = TMath::Sin(phase)*tmp1;
00566   }
00567 }

void TDSPVector::ResetSignal  )  [inline]
 

Definition at line 118 of file TDSPVector.h.

References fAllocedVec, and fVec.

00118 { fVec = fAllocedVec;};

void TDSPVector::Reverse  )  [inline]
 

Reverse the order.

Definition at line 494 of file TDSPVector.h.

References fVec, and Num.

00494                                 {
00495   Int_t  n=Num/2;
00496   Int_t n1=Num-1;
00497   TComplex tmp;
00498   for(register Int_t i=0;i<n;++i) {
00499     tmp=fVec[n1-i];
00500     fVec[n1-i] = fVec[i];
00501     fVec[i]=tmp;
00502   }
00503 }

void TDSPVector::SamplingRate Double_t  s  )  [inline]
 

Definition at line 229 of file TDSPVector.h.

References fSamplingRate.

00229 { fSamplingRate *= s;};

void TDSPVector::Save char *  fname,
char *  key,
char *  opt = "RECREATE"
 

Save a Vector into a file/key.

void TDSPVector::Save TFile *  f,
char *  key
 

Save a Vector into a file/key.

void TDSPVector::Set Int_t  i,
TDSPVector ,
Int_t  p = 0,
Int_t  len = -1
 

Set the values starting from i from vector at p..p+len-1.

void TDSPVector::Set Double_t   )  [inline]
 

Set all values to c.

Definition at line 467 of file TDSPVector.h.

References TComplex::fIm, TComplex::fRe, fVec, and Num.

00467                                       {
00468   for(register Int_t i=0;i<Num;++i) { fVec[i].fRe = d; fVec[i].fIm = 0; };
00469 }

void TDSPVector::Set const TComplex  )  [inline]
 

Set all values to c.

Definition at line 463 of file TDSPVector.h.

References fVec, and Num.

Referenced by Ones(), operator=(), and Zeros().

00463                                              {
00464   for(register Int_t i=0;i<Num;++i) fVec[i] = c;
00465 }

void TDSPVector::SetImag Double_t   )  [inline]
 

Set all imag parts to c.

Definition at line 475 of file TDSPVector.h.

References TComplex::fIm, fVec, and Num.

00475                                           {
00476   for(register Int_t i=0;i<Num;++i) fVec[i].fIm = d;
00477 }

virtual void TDSPVector::SetLen Int_t  num,
Bool_t  savedata = kFALSE
[virtual]
 

Set the size.

Reimplemented in TDSPMatrix.

Referenced by Adjoint(), Copy(), and TDSPMatrix::GetDiag().

void TDSPVector::SetMinLen Int_t  num  ) 
 

Set the minimum size to alloc.

void TDSPVector::SetReal Double_t   )  [inline]
 

Set all real parts to c.

Definition at line 471 of file TDSPVector.h.

References TComplex::fRe, fVec, and Num.

00471                                           {
00472   for(register Int_t i=0;i<Num;++i) fVec[i].fRe = d;
00473 }

void TDSPVector::SetSamplingRate Double_t  s  )  [inline]
 

Definition at line 227 of file TDSPVector.h.

References fSamplingRate.

Referenced by Configure().

00227 { fSamplingRate = s;};

void TDSPVector::SetVec TComplex s,
Int_t  num = -1
[inline]
 

Set the pointer to extern data.

Definition at line 458 of file TDSPVector.h.

References fVec, and Num.

Referenced by Alias(), TDSPBlockFifo::Shift(), and TDSPOutput1::Update().

00458                                                    {
00459   if (l!=-1) Num  = l;
00460   fVec = s;
00461 }

void TDSPVector::SetXTitle char *  name  ) 
 

Set the name of the xtitle.

void TDSPVector::SetYTitle char *  name  ) 
 

Set the name of the ytitle.

void TDSPVector::SetZero Int_t  z  )  [inline]
 

Definition at line 116 of file TDSPVector.h.

References fZero.

00116 { fZero=z; };             

void TDSPVector::Sin  )  [inline]
 

Sine of the Vector.

Definition at line 609 of file TDSPVector.h.

References fVec, and Num.

00609                             {
00610   for(register Int_t i=0;i<Num;++i) 
00611     fVec[i]= ::Sin(fVec[i]);
00612 }

void TDSPVector::Sqr  )  [inline]
 

Square the vector-abs : c^* * c.

Definition at line 569 of file TDSPVector.h.

References TComplex::fRe, fVec, and Num.

Referenced by Abs2().

00569                             {
00570   for(register Int_t i=0;i<Num;++i) 
00571     fVec[i]= fVec[i].fRe*fVec[i].fRe + fVec[i].fIm*fVec[i].fIm;
00572 }

void TDSPVector::Sqrt  )  [inline]
 

Square Root of the Vector.

Definition at line 580 of file TDSPVector.h.

References fVec, and Num.

00580                              {
00581   for(register Int_t i=0;i<Num;++i) 
00582     fVec[i]= ::Sqrt(fVec[i]);
00583 }

void TDSPVector::SqrtImag  )  [inline]
 

Square Root only on the imaginary part of the Vector.

Definition at line 619 of file TDSPVector.h.

References TComplex::fIm, fVec, Num, and Sqrt().

00619                                  {
00620   for(register Int_t i=0;i<Num;++i) 
00621     fVec[i].fIm = TMath::Sqrt(fVec[i].fIm);
00622 }

void TDSPVector::SqrtReal  )  [inline]
 

Square Root only on the real part of the Vector.

Definition at line 614 of file TDSPVector.h.

References TComplex::fRe, fVec, Num, and Sqrt().

00614                                  {
00615   for(register Int_t i=0;i<Num;++i) 
00616     fVec[i].fRe = TMath::Sqrt(fVec[i].fRe);
00617 }

void TDSPVector::Step  )  [inline]
 

Init with 0,1,2,3 ...

Definition at line 552 of file TDSPVector.h.

References fVec, and Num.

00552                              {
00553   for(register Int_t i=0;i<Num;++i)
00554     fVec[i] = i; 
00555 }

void TDSPVector::Step Double_t  start,
Double_t  step = 1.0
[inline]
 

Init with start,start+step,start+2*step etc.

Definition at line 545 of file TDSPVector.h.

References fVec, and Num.

00545                                                           {
00546   for(register Int_t i=0;i<Num;++i) { 
00547     fVec[i] = start;
00548     start+=step;
00549   }  
00550 }

void TDSPVector::Step TComplex start  )  [inline]
 

Init with start,start+1,start+2 etc.

Definition at line 537 of file TDSPVector.h.

References fVec, and Num.

00537                                             {
00538   TComplex s = start;
00539   for(register Int_t i=0;i<Num;++i) { 
00540     fVec[i] = s;
00541     s+=1;
00542   }  
00543 }

void TDSPVector::Step TComplex start,
TComplex step
[inline]
 

Init with start,start+step,start+2*step etc.

Definition at line 529 of file TDSPVector.h.

References fVec, and Num.

00529                                                             {
00530   TComplex s = start;
00531   for(register Int_t i=0;i<Num;++i) { 
00532     fVec[i] = s;
00533     s+=step;
00534   }  
00535 }

TDSPVector* TDSPVector::SubBy TComplex  a,
TDSPVector result = NULL
 

TDSPVector* TDSPVector::SubBy TDSPVector a,
TDSPVector result = NULL
 

TComplex TDSPVector::Sum TDSPVector weights = NULL  ) 
 

The Sum.

Referenced by Mean().

Double_t TDSPVector::Sum2 TDSPVector weights = NULL  ) 
 

The Sum of squares abs.

Referenced by Mean2(), and Norm2().

void TDSPVector::Swap Int_t  ,
Int_t 
[inline]
 

Swap two elements.

Definition at line 800 of file TDSPVector.h.

References fVec.

00800                                              {
00801   TComplex tmp=fVec[i];
00802   fVec[i] = fVec[j];
00803   fVec[j] = tmp;
00804 }

TDSPVector* TDSPVector::UpSampling UInt_t  K,
TDSPVector pulse = NULL,
TDSPVector output = NULL,
UInt_t  iStep = 1,
UInt_t  iOff = 0
 

K-fold interpolation filter with response "pulse".

Bool_t TDSPVector::UsingATLAS  )  [inline, static]
 

Definition at line 104 of file TDSPVector.h.

References fATLAS.

00104 { return fATLAS;}; 

void TDSPVector::ValuesPerLine UInt_t  p  )  [inline, static]
 

Definition at line 339 of file TDSPVector.h.

00339 { fPerLine = p;}; 

Double_t TDSPVector::Variance TDSPVector weights = NULL  ) 
 

Calculate the Variance.

Referenced by Std(), and Var().

TDSPVector* TDSPVector::XCorr TDSPVector i2,
TDSPVector result,
Int_t  max_lags = 0,
eXCorr_Options  o = kXCorrNone
 

Parameters:
i2  Crosscorrelation

TDSPVector* TDSPVector::XCorr TDSPVector i2,
Int_t  max_lags = 0,
eXCorr_Options  o = kXCorrNone
[inline]
 

Parameters:
i2  Crosscorrelation

Definition at line 275 of file TDSPVector.h.

References XCorr().

00277                                             { return XCorr(i2,   NULL , max_lags, o); };

TDSPVector* TDSPVector::XCorr Int_t  max_lags = 0,
eXCorr_Options  o = kXCorrNone
[inline]
 

Parameters:
max_lags  AutoCorrelation

Definition at line 272 of file TDSPVector.h.

Referenced by XCorr().

00273                                             { return XCorr(this, NULL , max_lags, o);};

void TDSPVector::Zeros  )  [inline]
 

Definition at line 126 of file TDSPVector.h.

References Set().

Referenced by Delta().

00126 { Set(0.0); };


Friends And Related Function Documentation

void econv TDSPVector a,
TDSPVector b,
TDSPVector c,
Int_t  offset = 0,
Int_t  step = 1,
Int_t  opt = kTDSPVector_Conv_Defaults
[friend]
 

TDSPVector* filter TDSPVector in,
TDSPVector out,
TDSPVector fir,
TDSPVector iir = NULL
[friend]
 

Double_t filternorm TDSPVector fir,
TDSPVector iir = NULL,
UInt_t  p = 2
[friend]
 

Referenced by TDSPStochasticSignal::ChangeRepresentation().

void mult TDSPVector a,
TDSPVector b,
TDSPVector c
[friend]
 

ostream& operator<< ostream &  ,
TDSPVector
[friend]
 

ostream& operator<< ostream &  ,
TDSPVector
[friend]
 

Bool_t operator== TDSPVector z1,
TDSPVector z2
[friend]
 

How many Values to Print per line (using cout...).

if the vector have not equal length the rest of the larger one has to be zero

Definition at line 685 of file TDSPVector.h.

00685                                                           {
00686   if (z1.GetSamplingRate()!=z2.GetSamplingRate()) {
00687     Warning("Dot2","Sampling rates differ (%f != %f) - vectors are NOT equal !",z1.GetSamplingRate(),z2.GetSamplingRate());
00688     return kFALSE;
00689   }
00690   Int_t     len1 = z1.GetLen();
00691   Int_t     len2 = z2.GetLen();
00692   
00693   TComplex *vec1 = z1.GetVec();
00694   TComplex *vec2 = z2.GetVec();
00695   
00696   if (len2<len1) {
00697     register Int_t tmp = len1;
00698     len1=len2;
00699     len2=tmp;
00700     vec1 = z2.GetVec();
00701     vec2 = z1.GetVec();
00702   } else {
00703     vec1 = z1.GetVec();
00704     vec2 = z2.GetVec();
00705     
00706   }
00707 
00708   register Int_t i;
00709   for(i=0;i<len1;++i) 
00710     if (vec1[i]!=vec2[i]) return kFALSE;  
00711   
00714 
00715   for(;i<len2;++i)
00716     if (vec2[i].fRe || vec2[i].fIm) return kFALSE;
00717   
00718   return kTRUE;
00719 }

istream& operator>> istream &  ,
TDSPVector
[friend]
 

istream& operator>> istream &  ,
TDSPVector
[friend]
 


Field Documentation

Int_t TDSPVector::fAllocedNum [protected]
 

Definition at line 92 of file TDSPVector.h.

TComplex* TDSPVector::fAllocedVec [protected]
 

Definition at line 91 of file TDSPVector.h.

Referenced by ResetSignal().

Bool_t TDSPVector::fATLAS [static, protected]
 

Definition at line 84 of file TDSPVector.h.

Referenced by DisableATLAS(), EnableATLAS(), and UsingATLAS().

Int_t TDSPVector::fPos [protected]
 

mom. position for pointwise filling etc.

Definition at line 89 of file TDSPVector.h.

Referenced by operator &=().

Double_t TDSPVector::fSamplingRate [protected]
 

The Sampling Rate.

Definition at line 93 of file TDSPVector.h.

Referenced by Energy(), GetSamplingRate(), GetTime(), operator==(), SamplingRate(), and SetSamplingRate().

UInt_t TDSPVector::fStrict [static, protected]
 

Strictmode 0=none,1=warning,2=strict.

Definition at line 83 of file TDSPVector.h.

TComplex* TDSPVector::fVec [protected]
 

Definition at line 87 of file TDSPVector.h.

Referenced by Abs(), Adjoint(), AdjointMe(), Alias(), Apply(), TDSPStochasticSignal::ChangeRepresentation(), Copy(), TDSPMatrix::Copy(), Cos(), Dot(), Dot2(), Element(), TDSPMatrix::Element(), Exp(), GetVec(), Log(), Log10(), Log2(), MaxAbs2(), MaxImag(), MaxReal(), MinAbs2(), MinImag(), MinReal(), MoveVec(), operator &=(), operator *=(), operator()(), TDSPMatrix::operator()(), operator+=(), operator-=(), operator/=(), operator[](), Phase(), RandN(), RandNimag(), RandNreal(), RandRayleigh(), ResetSignal(), Reverse(), Set(), SetImag(), SetReal(), SetVec(), Sin(), Sqr(), Sqrt(), SqrtImag(), SqrtReal(), Step(), Swap(), and TDSPMatrix::Swap().

char* TDSPVector::fXTitle [protected]
 

A name for the vector index.

Definition at line 85 of file TDSPVector.h.

char* TDSPVector::fYTitle [protected]
 

A name for the vector content.

Definition at line 86 of file TDSPVector.h.

Int_t TDSPVector::fZero [protected]
 

for absolut positioning (=pos of the zero)

Definition at line 94 of file TDSPVector.h.

Referenced by GetZero(), and SetZero().

Int_t TDSPVector::Num [protected]
 

Len of signal vectorm.

Definition at line 88 of file TDSPVector.h.

Referenced by Abs(), Adjoint(), AdjointMe(), Alias(), Apply(), TDSPStochasticSignal::ChangeRepresentation(), Copy(), TDSPMatrix::Copy(), Cos(), Dot(), Dot2(), Exp(), GetLen(), GetTime(), Hi(), Log(), Log10(), Log2(), MaxAbs2(), MaxImag(), MaxReal(), Mean(), Mean2(), MinAbs2(), MinImag(), MinReal(), operator *=(), operator()(), operator+=(), operator-=(), operator/=(), Phase(), Power(), RandN(), RandNimag(), RandNreal(), RandRayleigh(), Reverse(), Set(), SetImag(), SetReal(), SetVec(), Sin(), Sqr(), Sqrt(), SqrtImag(), SqrtReal(), and Step().


The documentation for this class was generated from the following file:
Generated on Fri Apr 23 16:24:14 2004 by doxygen 1.3.2