File indexing completed on 2025-01-18 10:12:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGraphDelaunay
0013 #define ROOT_TGraphDelaunay
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "TNamed.h"
0026
0027 class TGraph2D;
0028 class TView;
0029
0030 class TGraphDelaunay : public TNamed {
0031
0032 private:
0033
0034 TGraphDelaunay(const TGraphDelaunay&) = delete;
0035 TGraphDelaunay& operator=(const TGraphDelaunay&) = delete;
0036
0037 protected:
0038
0039 Int_t fNdt;
0040 Int_t fNpoints;
0041 Int_t fNhull;
0042 Double_t *fX;
0043 Double_t *fY;
0044 Double_t *fZ;
0045 Double_t *fXN;
0046 Double_t *fYN;
0047 Double_t fXNmin;
0048 Double_t fXNmax;
0049 Double_t fYNmin;
0050 Double_t fYNmax;
0051 Double_t fXoffset;
0052 Double_t fYoffset;
0053 Double_t fXScaleFactor;
0054 Double_t fYScaleFactor;
0055 Double_t fZout;
0056 Double_t *fDist;
0057 Int_t fMaxIter;
0058 Int_t fTriedSize;
0059 Int_t *fPTried;
0060 Int_t *fNTried;
0061 Int_t *fMTried;
0062 Int_t *fHullPoints;
0063 Int_t *fOrder;
0064 Bool_t fAllTri;
0065 Bool_t fInit;
0066 TGraph2D *fGraph2D;
0067
0068 void CreateTrianglesDataStructure();
0069 Bool_t Enclose(Int_t T1, Int_t T2, Int_t T3, Int_t Ex) const;
0070 void FileIt(Int_t P, Int_t N, Int_t M);
0071 void FindHull();
0072 Bool_t InHull(Int_t E, Int_t X) const;
0073 Double_t InterpolateOnPlane(Int_t TI1, Int_t TI2, Int_t TI3, Int_t E) const;
0074
0075 public:
0076
0077 TGraphDelaunay();
0078 TGraphDelaunay(TGraph2D *g);
0079
0080 ~TGraphDelaunay() override;
0081
0082 Double_t ComputeZ(Double_t x, Double_t y);
0083 void FindAllTriangles();
0084 TGraph2D *GetGraph2D() const {return fGraph2D;}
0085 Double_t GetMarginBinsContent() const {return fZout;}
0086 Int_t GetNdt() const {return fNdt;}
0087 Int_t *GetPTried() const {return fPTried;}
0088 Int_t *GetNTried() const {return fNTried;}
0089 Int_t *GetMTried() const {return fMTried;}
0090 Double_t *GetXN() const {return fXN;}
0091 Double_t *GetYN() const {return fYN;}
0092 Double_t GetXNmin() const {return fXNmin;}
0093 Double_t GetXNmax() const {return fXNmax;}
0094 Double_t GetYNmin() const {return fYNmin;}
0095 Double_t GetYNmax() const {return fYNmax;}
0096 Double_t Interpolate(Double_t x, Double_t y);
0097 void SetMaxIter(Int_t n=100000);
0098 void SetMarginBinsContent(Double_t z=0.);
0099
0100 ClassDefOverride(TGraphDelaunay,1)
0101 };
0102
0103 #endif