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

VectorRoutines.h

Go to the documentation of this file.
00001 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef VECTORROUTINES_H
00019 #define VECTORROUTINES_H
00020 
00021 inline Double_t Var(TDSPVector *s1, TDSPVector *weights=NULL)  
00022 {
00023   return s1->Variance(weights);
00024 }
00025 
00026 inline Double_t Var(TDSPVector &s1) 
00027 {
00028   return s1.Variance();
00029 }
00030 
00031 inline Double_t Std(TDSPVector *s1) 
00032 {
00033   return TMath::Sqrt(s1->Variance()/(s1->GetLen()-1.));
00034 }
00035 
00036 inline Double_t Std(TDSPVector& s1) 
00037 {
00038   return Std(&s1);
00039 }
00040 
00041 inline Double_t Dist(TDSPVector *s1, TDSPVector *s2) {
00042   return s1->Dist(s2);
00043 }
00044 inline Double_t Dist2(TDSPVector *s1, TDSPVector *s2) {
00045   return s1->Dist2(s2);
00046 }
00047 inline TComplex Dot(TDSPVector *s1, TDSPVector *s2, Bool_t conj=kTRUE) {
00048   return s1->Dot(s2,conj);
00049 }
00050 inline Double_t Dot2(TDSPVector *s1, TDSPVector *s2) {
00051   return s1->Dot2(s2);
00052 }
00053 
00054 inline Double_t Dist(TDSPVector& s1, TDSPVector& s2) {
00055   return s1.Dist(s2);
00056 }
00057 inline Double_t Dist2(TDSPVector& s1, TDSPVector& s2) {
00058   return s1.Dist2(s2);
00059 }
00060 inline TComplex Dot(TDSPVector& s1, TDSPVector& s2, Bool_t conj=kTRUE) {
00061   return s1.Dot(s2,conj);
00062 }
00063 inline Double_t Dot2(TDSPVector& s1, TDSPVector& s2) {
00064   return s1.Dot2(s2);
00065 }
00066 
00067 TDSPVector* Index(TComplex x, TComplex y=0, TComplex step=1, TDSPVector *result=NULL);
00068 
00069 inline TDSPVector* Conv(TDSPVector *in, TDSPVector *h, TDSPVector *out=NULL, 
00070             Int_t opt=kTDSPVector_Conv_Defaults, Int_t bl=0) {
00071   return h->Conv(in,out,opt,bl);
00072 }
00073 
00074 TDSPVector* Rect(Int_t L, Int_t N, Double_t norm=1,TDSPVector *in=NULL); 
00075 TDSPVector* Rect_FFTShift(Int_t L, Int_t N, Double_t norm=1,TDSPVector *in=NULL);  
00076 TDSPVector* Gaussnk(Int_t L,Double_t norm=1,TDSPVector *in=NULL); 
00077 TDSPVector* Gaussnk_FFTShift(Int_t L,Double_t norm=1,TDSPVector *in=NULL); 
00078 TDSPVector* Rcos(Int_t L, Int_t N, Double_t rolloff, Double_t norm=1.,TDSPVector *output=NULL); 
00079 TDSPVector* Rcos_FFTShift(Int_t L, Int_t N, Double_t rolloff, Double_t norm=1., TDSPVector *output=NULL); 
00080 TDSPVector* RandNC(UInt_t L, Double_t sigma=1.);
00081 TDSPVector* Delta(UInt_t L, Int_t one_pos=0.); 
00082 #endif

Generated on Fri Apr 23 16:23:44 2004 by doxygen 1.3.2