119 ((
TH1K*)
this)->Sort();
120 ((
TH1K*)
this)->fReady=1;
122 if (!
fNIn)
return 0.;
125 int jl=left,jr=left+1,nk,nkmax =
fKOrd;
126 float fl,fr,ff=0.,ffmin=1.e-6;
129 for (nk = 1; nk <= nkmax || ff <= ffmin; nk++) {
132 if (jl<0 && jr>=
fNIn)
break;
133 if (fl < fr) { ff = fl; jl--;}
134 else { ff = fr; jr++;}
136 ((
TH1K*)
this)->fKCur = nk - 1;
179 out <<
");"<<std::endl;
182 out<<
" "<<
GetName()<<
"->SetDirectory(0);"<<std::endl;
185 out<<
" "<<
GetName()<<
"->SetStats(0);"<<std::endl;
192 out<<
" Float_t Arr[]={"<<std::endl;
193 for (
int i=0; i<
fNIn; i++) {
195 if (i != fNIn-1) {out<<
",";}
else { out<<
"};";}
196 if (i%10 == 9) {out<< std::endl;}
199 out<<
" for(int i=0;i<" << fNIn <<
";i++)"<<
GetName()<<
"->Fill(Arr[i]);";
212 <<quote<<option<<quote<<
");"<<std::endl;
222 if (*((
float*)f1) < *((
float*)f2))
return -1;
223 if (*((
float*)f1) > *((
float*)f2))
return 1;
virtual const char * GetName() const
Returns name of object.
virtual void SaveAttributes(std::ostream &out, const char *name, const char *subname)
Save axis attributes as C++ statement(s) on output stream out.
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
void AddAt(Float_t c, Int_t i)
Add float c at position i. Check for out of bounds.
const Float_t * GetArray() const
TAxis fYaxis
Y axis descriptor.
Bool_t TestBit(UInt_t f) const
static Bool_t fgStatOverflows
!flag to use under/overflows in statistics
Array of floats (32 bits per element).
virtual ~TH1K()
Destructor.
void ToLower()
Change string to lower-case.
TAxis fZaxis
Z axis descriptor.
Double_t fTsumwx2
Total Sum of weight*X*X.
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
TDirectory * fDirectory
!Pointer to directory holding this histogram
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
TString fOption
histogram options
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual void Copy(TObject &obj) const
Copy this histogram structure to newth1.
Double_t fTsumwx
Total Sum of weight*X.
Double_t fEntries
Number of entries.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
virtual void Copy(TObject &hnew) const
Copy this histogram structure to newth1.
virtual Double_t GetBinContent(Int_t bin) const
Return content of global bin number bin.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out Note the following restrictions in the code...
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
TH1K class supports the nearest K Neighbours method, widely used in cluster analysis.
Double_t fTsumw2
Total Sum of squares of weights.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
Double_t fTsumw
Total Sum of weights.
static int TH1K_fcompare(const void *f1, const void *f2)
Compare.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Mother of all ROOT objects.
double f2(const double *x)
Int_t fDimension
!Histogram dimension (1, 2 or 3 dim)
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
void Set(Int_t n)
Set size of this array to n floats.
TAxis fXaxis
X axis descriptor.
Double_t Sqrt(Double_t x)
Long64_t BinarySearch(Long64_t n, const T *array, T value)
virtual Double_t GetBinError(Int_t bin) const
Return content of global bin error.
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const