<commit_before>// @(#)root/hist:$Id$
// Author: <NAME> <<EMAIL>>  21/02/2001

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include <stdlib.h>

#include "Riostream.h"
#include "TH1K.h"
#include "TMath.h"

//______________________________________________________________________________
// 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 <NAME> <<EMAIL>>

ClassImp(TH1K)


//______________________________________________________________________________
TH1K::TH1K(): TH1(), TArrayF()
{
   // Constructor.

   fDimension = 1;
   fNIn   = 0;
   fReady = 0;
   fKOrd  = 3;
}


//______________________________________________________________________________
TH1K::TH1K(const char *name,const char *title,Int_t nbins,Double_t xlow,Double_t xup,Int_t k)
     : TH1(name,title,nbins,xlow,xup), TArrayF(100)
{
   // Create a 1-Dim histogram with fix bins of type float
   // (see TH1K::TH1 for explanation of parameters)

   fDimension = 1;
   fNIn = 0;
   fReady = 0;
   fKOrd = k;
}


//______________________________________________________________________________
TH1K::~TH1K()
{
   // Destructor.
}


//______________________________________________________________________________
Int_t TH1K::Fill(Double_t x)
{<commit_msg>Fix uninitialized members Coverity CID 11206, 11207<commit_after>// @(#)root/hist:$Id$
// Author: <NAME> <<EMAIL>>  21/02/2001

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include <stdlib.h>

#include "Riostream.h"
#include "TH1K.h"
#include "TMath.h"

//______________________________________________________________________________
// 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 <NAME> <<EMAIL>@bnl.gov>

ClassImp(TH1K)


//______________________________________________________________________________
TH1K::TH1K(): TH1(), TArrayF()
{
   // Constructor.

   fDimension = 1;
   fNIn   = 0;
   fReady = 0;
   fKOrd  = 3;
   fKCur  = 0;
}


//______________________________________________________________________________
TH1K::TH1K(const char *name,const char *title,Int_t nbins,Double_t xlow,Double_t xup,Int_t k)
     : TH1(name,title,nbins,xlow,xup), TArrayF(100)
{
   // Create a 1-Dim histogram with fix bins of type float
   // (see TH1K::TH1 for explanation of parameters)

   fDimension = 1;
   fNIn   = 0;
   fReady = 0;
   fKOrd  = k;
   fKCur  = 0;
}


//______________________________________________________________________________
TH1K::~TH1K()
{
   // Destructor.
}


//______________________________________________________________________________
Int_t TH1K::Fill(Double_t x)
{
{'fraction_non_alphanumeric': 0.16279069767441862, 'fraction_numerical': 0.02477722234296892, 'mean_word_length': 2.7876543209876545, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '476129', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1253, 'n_words': 338}