ROOT logo
AliRoot » STAT » TKDInterpolatorBase

class TKDInterpolatorBase

 Memory setup of protected data members
 fRefPoints : evaluation point of PDF for each terminal node of underlying KD Tree.
 | 1st terminal node (fNDim point coordinates) | 2nd terminal node (fNDim point coordinates) | ...

 fRefValues : evaluation value/error of PDF for each terminal node of underlying KD Tree.
 | 1st terminal node (value) | 2nd terminal node (value) | ... | 1st terminal node (error) | 2nd terminal node (error) | ...

 status = |0|0|0|0|0|1(tri-cubic weights)|1(STORE)|1 INT(0 COG )|

Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~TKDInterpolatorBase()
Bool_tBootstrap()
static TClass*Class()
voidDrawProjection(UInt_t ax1 = 0, UInt_t ax2 = 1)
Double_tEval(const Double_t* point, Double_t& result, Double_t& error, Bool_t force = kFALSE)
Float_tGetAlpha() const
Bool_tGetCOGPoint(Int_t node, Float_t*& coord, Float_t& val, Float_t& error) const
Int_tGetLambda() const
virtual Int_tGetNodeIndex(const Float_t* p)
TKDNodeInfo*GetNodeInfo(Int_t inode) const
Int_tGetNTNodes() const
Bool_tGetRange(Int_t ax, Float_t& min, Float_t& max) const
Int_tGetSize() const
voidGetStatus(Option_t* opt = "")
Bool_tHasStore() const
virtual TClass*IsA() const
voidSetAlpha(Float_t a)
voidSetCOG(Bool_t on = kTRUE)
voidSetStore(Bool_t on = kTRUE)
voidSetWeights(Bool_t on = kTRUE)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
Bool_tUseCOG() const
Bool_tUseWeights() const
protected:
virtual Bool_tBuild(Int_t nnodes)

Data Members

public:
enum EKDInterpolatorBase { kdN
kNhelper
};
enum EKDInterpolatorBaseBits { kCOG
kSTORE
kWEIGHTS
};
protected:
Float_tfAlphaparameter controlling the size of the region to interpolate n = (1+alpha)*lambda
Double_t*fBuffer! working space [2*fLambda]
Short_tfDepth! depth of the KD Tree structure used
TLinearFitter*fFitter! linear fitter
TKDTree<Int_t,Float_t>*fKDhelper! kNN finder
UChar_tfLambda! number of parameters in polynom
Int_tfNSize!data dimension
TClonesArray*fNodesinterpolation nodes
TKDNodeInfo::TKDNodeDraw*fNodesDraw!graphical representation of interpolation nodes
Float_t**fRefPoints! temporary storage of COG data
UChar_tfStatusstatus of the interpolator

Class Charts

Inheritance Chart:
TKDInterpolatorBase
TKDInterpolator
TKDSpline
TKDPDF

Function documentation

Bool_t Build(Int_t nnodes)
 allocate memory for data
Bool_t Bootstrap()
~TKDInterpolatorBase()
Bool_t GetCOGPoint(Int_t node, Float_t*& coord, Float_t& val, Float_t& error) const
TKDNodeInfo* GetNodeInfo(Int_t inode) const
Int_t GetNTNodes() const
Bool_t GetRange(Int_t ax, Float_t& min, Float_t& max) const
void GetStatus(Option_t* opt = "")
 Prints the status of the interpolator
Double_t Eval(const Double_t* point, Double_t& result, Double_t& error, Bool_t force = kFALSE)
 Evaluate PDF for "point". The result is returned in "result" and error in "error". The function returns the chi2 of the fit.

 Observations:

 1. The default method used for interpolation is kCOG.
 2. The initial number of neighbors used for the estimation is set to Int(alpha*fLambda) (alpha = 1.5)
void DrawProjection(UInt_t ax1 = 0, UInt_t ax2 = 1)
 Draw nodes structure projected on plane "ax1:ax2". The parameter
 "depth" specifies the bucket size per node. If depth == -1 draw only
 terminal nodes and evaluation points (default -1 i.e. bucket size per node equal bucket size specified by the user)

void SetAlpha(Float_t a)
Int_t GetNodeIndex(const Float_t* p)
Float_t GetAlpha() const
{return fAlpha;}
Int_t GetLambda() const
{return fLambda;}
Int_t GetSize() const
{return fNSize;}
Bool_t HasStore() const
{return TESTBIT(fStatus, kSTORE);}
Bool_t UseCOG() const
{return TESTBIT(fStatus, kCOG);}
Bool_t UseWeights() const
{return TESTBIT(fStatus, kWEIGHTS);}
void SetCOG(Bool_t on = kTRUE)
{on ? SETBIT(fStatus, kCOG) : CLRBIT(fStatus, kCOG);}
void SetStore(Bool_t on = kTRUE)
{on ? SETBIT(fStatus, kSTORE) : CLRBIT(fStatus, kSTORE);}
void SetWeights(Bool_t on = kTRUE)
{on ? SETBIT(fStatus, kWEIGHTS) : CLRBIT(fStatus, kWEIGHTS);}
TKDInterpolatorBase& operator=(const TKDInterpolatorBase& )