class TH1K: public TH1, public TArrayF

``` The TH1K Class

TH1K class supports the nearest K Neighbours method,
widely used in cluster analysis.
This method is especially useful for small statistics.

In this method :
DensityOfProbability ~ 1/DistanceToNearestKthNeighbour

Ctr TH1K::TH1K(name,title,nbins,xlow,xup,K=0)
differs from TH1F only by "K"
K - is the order of K Neighbours method, usually >=3
K = 0, means default, where K is selected by TH1K in such a way
that DistanceToNearestKthNeighbour > BinWidth and K >=3

This class has been implemented by Victor Perevoztchikov <perev@bnl.gov>
```

Function Members (Methods)

public:
protected:
 Bool_t TArray::BoundsOk(const char* where, Int_t at) const virtual Int_t TH1::BufferFill(Double_t x, Double_t w) static bool TH1::CheckAxisLimits(const TAxis* a1, const TAxis* a2) static bool TH1::CheckBinLabels(const TAxis* a1, const TAxis* a2) static bool TH1::CheckBinLimits(const TAxis* a1, const TAxis* a2) static bool TH1::CheckConsistency(const TH1* h1, const TH1* h2) static bool TH1::CheckConsistentSubAxes(const TAxis* a1, Int_t firstBin1, Int_t lastBin1, const TAxis* a2, Int_t firstBin2 = 0, Int_t lastBin2 = 0) static bool TH1::CheckEqualAxes(const TAxis* a1, const TAxis* a2) virtual void TObject::DoError(int level, const char* location, const char* fmt, va_list va) const virtual void TH1::DoFillN(Int_t ntimes, const Double_t* x, const Double_t* w, Int_t stride = 1) virtual Double_t TH1::DoIntegral(Int_t ix1, Int_t ix2, Int_t iy1, Int_t iy2, Int_t iz1, Int_t iz2, Double_t& err, Option_t* opt, Bool_t doerr = kFALSE) const virtual Bool_t TH1::FindNewAxisLimits(const TAxis* axis, const Double_t point, Double_t& newMin, Double_t& newMax) virtual Double_t TH1::GetBinErrorSqUnchecked(Int_t bin) const void TObject::MakeZombie() Bool_t TArray::OutOfBoundsError(const char* where, Int_t i) const static Bool_t TH1::RecomputeAxisLimits(TAxis& destAxis, const TAxis& anAxis) virtual Double_t TH1::RetrieveBinContent(Int_t bin) const static Bool_t TH1::SameLimitsAndNBins(const TAxis& axis1, const TAxis& axis2) virtual void TH1::SavePrimitiveHelp(ostream& out, const char* hname, Option_t* option = "") virtual void TH1::UpdateBinContent(Int_t bin, Double_t content)
private:
 void Sort()

Data Members

public:
 Float_t* TArrayF::fArray [fN] Array of fN floats Int_t TArray::fN Number of array elements static TH1::(anonymous) TH1::kAllAxes static TObject::(anonymous) TObject::kBitMask static TObject::EStatusBits TObject::kCanDelete static TH1::(anonymous) TH1::kCanRebin static TObject::EStatusBits TObject::kCannotPick static TObject::EStatusBits TObject::kHasUUID static TObject::EStatusBits TObject::kInvalidObject static TH1::(anonymous) TH1::kIsAverage static TH1::(anonymous) TH1::kIsNotW static TObject::(anonymous) TObject::kIsOnHeap static TObject::EStatusBits TObject::kIsReferenced static TH1::(anonymous) TH1::kIsZoomed static TH1::(anonymous) TH1::kLogX static TObject::EStatusBits TObject::kMustCleanup static TH1::(anonymous) TH1::kNoAxis static TObject::EStatusBits TObject::kNoContextMenu static TH1::(anonymous) TH1::kNoStats static TH1::(anonymous) TH1::kNoTitle static TH1::EBinErrorOpt TH1::kNormal static TObject::(anonymous) TObject::kNotDeleted static TH1::(anonymous) TH1::kNstat static TObject::EStatusBits TObject::kObjInCanvas static TObject::(anonymous) TObject::kOverwrite static TH1::EBinErrorOpt TH1::kPoisson static TH1::EBinErrorOpt TH1::kPoisson2 static TObject::(anonymous) TObject::kSingleKey static TH1::(anonymous) TH1::kUserContour static TObject::(anonymous) TObject::kWriteDelete static TH1::(anonymous) TH1::kXaxis static TH1::(anonymous) TH1::kYaxis static TH1::(anonymous) TH1::kZaxis static TObject::(anonymous) TObject::kZombie
protected:
 Short_t TH1::fBarOffset (1000*offset) for bar charts or legos Short_t TH1::fBarWidth (1000*width) for bar charts or legos TH1::EBinErrorOpt TH1::fBinStatErrOpt option for bin statistical errors Double_t* TH1::fBuffer [fBufferSize] entry buffer Int_t TH1::fBufferSize fBuffer size TArrayD TH1::fContour Array to display contour levels Int_t TH1::fDimension !Histogram dimension (1, 2 or 3 dim) TDirectory* TH1::fDirectory !Pointer to directory holding this histogram Double_t TH1::fEntries Number of entries Color_t TAttFill::fFillColor fill area color Style_t TAttFill::fFillStyle fill area style TList* TH1::fFunctions ->Pointer to list of functions (fits and user) Double_t* TH1::fIntegral !Integral of bins used by GetRandom Int_t fKCur ! Int_t fKOrd ! Color_t TAttLine::fLineColor line color Style_t TAttLine::fLineStyle line style Width_t TAttLine::fLineWidth line width Color_t TAttMarker::fMarkerColor Marker color index Size_t TAttMarker::fMarkerSize Marker size Style_t TAttMarker::fMarkerStyle Marker style Double_t TH1::fMaximum Maximum value for plotting Double_t TH1::fMinimum Minimum value for plotting Int_t fNIn TString TNamed::fName object identifier Int_t TH1::fNcells number of bins(1D), cells (2D) +U/Overflows Double_t TH1::fNormFactor Normalization factor TString TH1::fOption histogram options TVirtualHistPainter* TH1::fPainter !pointer to histogram painter Int_t fReady ! TArrayD TH1::fSumw2 Array of sum of squares of weights TString TNamed::fTitle object title Double_t TH1::fTsumw Total Sum of weights Double_t TH1::fTsumw2 Total Sum of squares of weights Double_t TH1::fTsumwx Total Sum of weight*X Double_t TH1::fTsumwx2 Total Sum of weight*X*X TAxis TH1::fXaxis X axis descriptor TAxis TH1::fYaxis Y axis descriptor TAxis TH1::fZaxis Z axis descriptor static Bool_t TH1::fgAddDirectory !flag to add histograms to the directory static Int_t TH1::fgBufferSize !default buffer size for automatic histograms static Bool_t TH1::fgDefaultSumw2 !flag to call TH1::Sumw2 automatically at histogram creation time static Bool_t TH1::fgStatOverflows !flag to use under/overflows in statistics

Function documentation

TH1K()
``` Constructor.
```
TH1K(const char* name, const char* title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t k = 0)
``` Create a 1-Dim histogram with fix bins of type float
(see TH1K::TH1 for explanation of parameters)
```
~TH1K()
``` Destructor.
```
void Copy(TObject& obj) const
``` Copy this histogram structure to newth1.

Note that this function does not copy the list of associated functions.
Use TObject::Clone to make a full copy of an histogram.
```

``` Increment bin with abscissa X by 1.

if x is less than the low-edge of the first bin, the Underflow bin is incremented
if x is greater than the upper edge of last bin, the Overflow bin is incremented

If the storage of the sum of squares of weights has been triggered,
via the function Sumw2, then the sum of the squares of weights is incremented
by 1 in the bin corresponding to x.
```
Double_t GetBinContent(Int_t bin) const
``` Return content of global bin number bin.
```
Double_t GetBinError(Int_t bin) const
``` Return content of global bin error.
```
void Reset(Option_t* option = "")
``` Reset.
```
void SavePrimitive(ostream& out, Option_t* option = "")
``` Save primitive as a C++ statement(s) on output stream out
Note the following restrictions in the code generated:
- variable bin size not implemented
- Objects in list of functions not saved (fits)
- Contours not saved
```
void Sort()
``` Sort.
```
TH1K()

`{return TH1::Fill(x,w);}`
Double_t GetBinContent(Int_t bin) const
Double_t GetBinContent(Int_t bin, Int_t ) const
`{return GetBinContent(bin);}`
Double_t GetBinError(Int_t bin) const
Double_t GetBinError(Int_t bin, Int_t ) const
`{return GetBinError(bin);}`
void SetKOrd(Int_t k)
`{fKOrd=k;}`