Logo ROOT   6.07/09
Reference Guide
TSpline1.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : TSpline1 *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Linear interpolation class; derivative of TSpline *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * Helge Voss <Helge.Voss@cern.ch> - MPI-K Heidelberg, Germany *
16  * Kai Voss <Kai.Voss@cern.ch> - U. of Victoria, Canada *
17  * *
18  * Copyright (c) 2005: *
19  * CERN, Switzerland *
20  * U. of Victoria, Canada *
21  * MPI-K Heidelberg, Germany *
22  * *
23  * Redistribution and use in source and binary forms, with or without *
24  * modification, are permitted according to the terms listed in LICENSE *
25  * (http://tmva.sourceforge.net/LICENSE) *
26  **********************************************************************************/
27 
28 #ifndef ROOT_TMVA_TSpline1
29 #define ROOT_TMVA_TSpline1
30 
31 //////////////////////////////////////////////////////////////////////////
32 // //
33 // TSpline1 //
34 // //
35 // Linear interpolation class //
36 // //
37 //////////////////////////////////////////////////////////////////////////
38 
39 #ifndef ROOT_TSpline
40 #include "TSpline.h"
41 #endif
42 
43 namespace TMVA {
44 
45  class TSpline1 : public TSpline {
46 
47  public:
48 
49  TSpline1( const TString& title, TGraph* theGraph );
50  virtual ~TSpline1( void );
51 
52  virtual Double_t Eval( Double_t x ) const;
53 
54  // dummy implementations
55  virtual void BuildCoeff( void );
56  virtual void GetKnot( Int_t i, Double_t& x, Double_t& y ) const;
57 
58  const TGraph* GetGraph() const { return fGraph; }
59 
60  private:
61 
62  TGraph *fGraph; // graph that is splined
63 
64  ClassDef(TSpline1,0); //Linear interpolation class
65  };
66 
67 } // namespace TMVA
68 
69 #endif
70 
71 
const TGraph * GetGraph() const
Definition: TSpline1.h:58
Base class for spline implementation containing the Draw/Paint methods //.
Definition: TSpline.h:22
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
TGraph * fGraph
Definition: TSpline1.h:62
double Double_t
Definition: RtypesCore.h:55
Double_t y[n]
Definition: legend1.C:17
virtual Double_t Eval(Double_t x) const
returns linearly interpolated TGraph entry around x
Definition: TSpline1.cxx:61
virtual void BuildCoeff(void)
no coefficients to precompute
Definition: TSpline1.cxx:87
Abstract ClassifierFactory template that handles arbitrary types.
A Graph is a graphics object made of two arrays X and Y with npoints each.
Definition: TGraph.h:53
virtual ~TSpline1(void)
destructor
Definition: TSpline1.cxx:53
virtual void GetKnot(Int_t i, Double_t &x, Double_t &y) const
no knots
Definition: TSpline1.cxx:94
TSpline1(const TString &title, TGraph *theGraph)
constructor from TGraph TSpline is a TNamed object
Definition: TSpline1.cxx:44