File indexing completed on 2025-01-18 10:12:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_TKDEFGT
0012 #define ROOT_TKDEFGT
0013
0014 #include <vector>
0015
0016 #include "RtypesCore.h"
0017
0018
0019
0020
0021 class TGL5DDataSet;
0022
0023 class TKDEFGT {
0024 private:
0025
0026 std::vector<Double_t> fXC;
0027 std::vector<Double_t> fWeights;
0028 std::vector<UInt_t> fIndxc;
0029 std::vector<Double_t> fA_K;
0030 std::vector<UInt_t> fIndx;
0031 std::vector<UInt_t> fXhead;
0032 std::vector<UInt_t> fXboxsz;
0033 std::vector<Double_t> fDistC;
0034 std::vector<Double_t> fC_K;
0035 std::vector<UInt_t> fCinds;
0036
0037 mutable std::vector<UInt_t> fHeads;
0038 mutable std::vector<Double_t> fDx;
0039 mutable std::vector<Double_t> fProds;
0040
0041 UInt_t fDim;
0042 UInt_t fP;
0043 UInt_t fK;
0044 Double_t fSigma;
0045 UInt_t fPD;
0046 Bool_t fModelValid;
0047
0048 public:
0049 TKDEFGT();
0050
0051 virtual ~TKDEFGT();
0052
0053
0054
0055
0056 void BuildModel(const std::vector<Double_t> &sources, Double_t sigma = 1.,
0057 UInt_t dim = 3, UInt_t p = 8, UInt_t k = 0);
0058
0059 void BuildModel(const TGL5DDataSet *sources, Double_t sigma = 1.,
0060 UInt_t p = 8, UInt_t k = 0);
0061
0062
0063 void Predict(const std::vector<Double_t> &targets, std::vector<Double_t> &densities,
0064 Double_t e)const;
0065
0066 private:
0067
0068 void Kcenter(const std::vector<double> &x);
0069
0070 void Kcenter(const TGL5DDataSet *sources);
0071
0072 void Compute_C_k();
0073
0074 void Compute_A_k(const std::vector<Double_t> &x);
0075
0076 void Compute_A_k(const TGL5DDataSet *sources);
0077
0078 TKDEFGT(const TKDEFGT &rhs);
0079 TKDEFGT &operator = (const TKDEFGT &rhs);
0080 };
0081
0082 #endif