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;
static int TH1K_fcompare(const void *f1, const void *f2)
Compare.
Array of floats (32 bits per element).
const Float_t * GetArray() const
void Set(Int_t n)
Set size of this array to n floats.
void AddAt(Float_t c, Int_t i)
Add float c at position i. Check for out of bounds.
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 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.
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 SaveAttributes(std::ostream &out, const char *name, const char *subname)
Save axis attributes as C++ statement(s) on output stream out.
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.
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
virtual void Copy(TObject &obj) const
Copy this histogram structure to newth1.
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 Double_t GetBinError(Int_t bin) const
Return content of global bin error.
virtual Double_t GetBinContent(Int_t bin) const
Return content of global bin number bin.
virtual ~TH1K()
Destructor.
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
Double_t fTsumw
Total Sum of weights.
Double_t fTsumw2
Total Sum of squares of weights.
Double_t fTsumwx2
Total Sum of weight*X*X.
@ kNoStats
don't draw stats box
TDirectory * fDirectory
!Pointer to directory holding this histogram
virtual void Reset(Option_t *option="")
Reset this histogram: contents, errors, etc.
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
Int_t fDimension
!Histogram dimension (1, 2 or 3 dim)
virtual void Copy(TObject &hnew) const
Copy this histogram structure to newth1.
Double_t fEntries
Number of entries.
TAxis fZaxis
Z axis descriptor.
TAxis fXaxis
X axis descriptor.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width for 1D histogram.
Bool_t GetStatOverflowsBehaviour() const
TAxis fYaxis
Y axis descriptor.
Double_t fTsumwx
Total Sum of weight*X.
TString fOption
histogram options
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void ToLower()
Change string to lower-case.
const char * Data() const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Double_t Sqrt(Double_t x)
Long64_t BinarySearch(Long64_t n, const T *array, T value)