library: libGraf
#include "TSpline.h"

TSpline3


class description - header file - source file
viewCVS header - viewCVS source

class TSpline3: public TSpline

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TSpline3()
TSpline3(const char* title, const TGraph* g, const char* opt = "0", Double_t valbeg = 0, Double_t valend = 0)
TSpline3(const char* title, Double_t* x, Double_t* y, Int_t n, const char* opt = "0", Double_t valbeg = 0, Double_t valend = 0)
TSpline3(const char* title, Double_t* x, const TF1* func, Int_t n, const char* opt = "0", Double_t valbeg = 0, Double_t valend = 0)
TSpline3(const char* title, Double_t xmin, Double_t xmax, Double_t* y, Int_t n, const char* opt = "0", Double_t valbeg = 0, Double_t valend = 0)
TSpline3(const char* title, Double_t xmin, Double_t xmax, const TF1* func, Int_t n, const char* opt = "0", Double_t valbeg = 0, Double_t valend = 0)
virtual~TSpline3()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")
Double_tDerivative(Double_t x) const
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTSpline::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual Double_tEval(Double_t x) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Int_tFindX(Double_t x) const
voidGetCoeff(Int_t i, Double_t& x, Double_t& y, Double_t& b, Double_t& c, Double_t& d)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Color_tTAttFill::GetFillColor() const
virtual Style_tTAttFill::GetFillStyle() const
virtual const char*TObject::GetIconName() const
virtual voidGetKnot(Int_t i, Double_t& x, Double_t& y) const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
virtual Color_tTAttMarker::GetMarkerColor() const
virtual Size_tTAttMarker::GetMarkerSize() const
virtual Style_tTAttMarker::GetMarkerStyle() const
virtual const char*TNamed::GetName() const
virtual Int_tTSpline::GetNpx() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tTAttFill::IsTransparent() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTAttLine::Modify()
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTSpline::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTAttFill::ResetAttFill(Option_t* option = "")
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
virtual voidTAttMarker::ResetAttMarker(Option_t* toption = "")
voidTObject::ResetBit(UInt_t f)
virtual voidSaveAs(const char* filename, Option_t* option = "") const
virtual voidTAttFill::SaveFillAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1001)
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidTAttMarker::SaveMarkerAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t sizdef = 1)
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
virtual voidTAttFill::SetFillAttributes()
virtual voidTAttFill::SetFillColor(Color_t fcolor)
virtual voidTAttFill::SetFillStyle(Style_t fstyle)
virtual voidTAttLine::SetLineAttributes()
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual voidTAttMarker::SetMarkerAttributes()
virtual voidTAttMarker::SetMarkerColor(Color_t tcolor = 1)
virtual voidTAttMarker::SetMarkerSize(Size_t msize = 1)
virtual voidTAttMarker::SetMarkerStyle(Style_t mstyle = 1)
virtual voidTNamed::SetName(const char* name)
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidTSpline::SetNpx(Int_t n)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
static voidTest()
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
protected:
TSpline3(const TSpline3&)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
TSpline3&operator=(const TSpline3&)
private:
virtual voidBuildCoeff()
voidSetCond(const char* opt)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Double_tTSpline::fDeltaDistance between equidistant knots
Double_tTSpline::fXminMinimum value of abscissa
Double_tTSpline::fXmaxMaximum value of abscissa
Int_tTSpline::fNpNumber of knots
Bool_tTSpline::fKstepTrue of equidistant knots
TH1F*TSpline::fHistogramTemporary histogram
TGraph*TSpline::fGraphGraph for drawing the knots
Int_tTSpline::fNpxNumber of points used for graphical representation
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Color_tTAttFill::fFillColorfill area color
Style_tTAttFill::fFillStylefill area style
Color_tTAttMarker::fMarkerColorMarker color index
Style_tTAttMarker::fMarkerStyleMarker style
Size_tTAttMarker::fMarkerSizeMarker size
private:
TSplinePoly3*fPoly[fNp] Array of polynomial terms
Double_tfValBegInitial value of first or second derivative
Double_tfValEndEnd value of first or second derivative
Int_tfBegCond0=no beg cond, 1=first derivative, 2=second derivative
Int_tfEndCond0=no end cond, 1=first derivative, 2=second derivative

Class Description

                                                                      
 TSpline                                                              
                                                                      
 Base class for spline implementation containing the Draw/Paint       
 methods                                                              
                                                                      

TSpline3(const char *title, Double_t x[], Double_t y[], Int_t n, const char *opt, Double_t valbeg, Double_t valend)
 Third spline creator given an array of
 arbitrary knots in increasing abscissa order and
 possibly end point conditions
TSpline3(const char *title, Double_t xmin, Double_t xmax, Double_t y[], Int_t n, const char *opt, Double_t valbeg, Double_t valend)
 Third spline creator given an array of
 arbitrary function values on equidistant n abscissa
 values from xmin to xmax and possibly end point conditions
TSpline3(const char *title, Double_t x[], const TF1 *func, Int_t n, const char *opt, Double_t valbeg, Double_t valend)
 Third spline creator given an array of
 arbitrary abscissas in increasing order and a function
 to interpolate and possibly end point conditions
TSpline3(const char *title, Double_t xmin, Double_t xmax, const TF1 *func, Int_t n, const char *opt, Double_t valbeg, Double_t valend)
 Third spline creator given a function to be
 evaluated on n equidistand abscissa points between xmin
 and xmax and possibly end point conditions
TSpline3(const char *title, const TGraph *g, const char *opt, Double_t valbeg, Double_t valend)
 Third spline creator given a TGraph with
 abscissa in increasing order and possibly end
 point conditions
TSpline3(const TSpline3& sp3)
copy constructor
TSpline3& operator=(const TSpline3& sp3)
assignment operator
void SetCond(const char *opt)
 Check the boundary conditions
void Test()
 Test method for TSpline5

   n          number of data points.
   m          2*m-1 is order of spline.
                 m = 2 always for third spline.
   nn,nm1,mm,
   mm1,i,k,
   j,jj       temporary integer variables.
   z,p        temporary double precision variables.
   x[n]       the sequence of knots.
   y[n]       the prescribed function values at the knots.
   a[200][4]  two dimensional array whose columns are
                 the computed spline coefficients
   diff[3]    maximum values of differences of values and
                 derivatives to right and left of knots.
   com[3]     maximum values of coefficients.


   test of TSpline3 with nonequidistant knots and
      equidistant knots follows.
Int_t FindX(Double_t x)
 Find X
Double_t Eval(Double_t x)
 Eval this spline at x
Double_t Derivative(Double_t x)
 Derivative
void SaveAs(const char *filename, Option_t * /*option*/)
 write this spline as a C++ function that can be executed without ROOT
 the name of the function is the name of the file up to the "." if any
void BuildCoeff()
      subroutine cubspl ( tau, c, n, ibcbeg, ibcend )
  from  * a practical guide to splines *  by c. de boor
     ************************  input  ***************************
     n = number of data points. assumed to be .ge. 2.
     (tau(i), c(1,i), i=1,...,n) = abscissae and ordinates of the
        data points. tau is assumed to be strictly increasing.
     ibcbeg, ibcend = boundary condition indicators, and
     c(2,1), c(2,n) = boundary condition information. specifically,
        ibcbeg = 0  means no boundary condition at tau(1) is given.
           in this case, the not-a-knot condition is used, i.e. the
           jump in the third derivative across tau(2) is forced to
           zero, thus the first and the second cubic polynomial pieces
           are made to coincide.)
        ibcbeg = 1  means that the slope at tau(1) is made to equal
           c(2,1), supplied by input.
        ibcbeg = 2  means that the second derivative at tau(1) is
           made to equal c(2,1), supplied by input.
        ibcend = 0, 1, or 2 has analogous meaning concerning the
           boundary condition at tau(n), with the additional infor-
           mation taken from c(2,n).
     ***********************  output  **************************
     c(j,i), j=1,...,4; i=1,...,l (= n-1) = the polynomial coefficients
        of the cubic interpolating spline with interior knots (or
        joints) tau(2), ..., tau(n-1). precisely, in the interval
        (tau(i), tau(i+1)), the spline f is given by
           f(x) = c(1,i)+h*(c(2,i)+h*(c(3,i)+h*c(4,i)/3.)/2.)
        where h = x - tau(i). the function program *ppvalu* may be
        used to evaluate f or its derivatives from tau,c, l = n-1,
        and k=4.
void Streamer(TBuffer &R__b)
 Stream an object of class TSpline3.
void GetKnot(Int_t i, Double_t &x, Double_t &y)
TSpline3(const TSpline3&)
virtual ~TSpline3()
{if (fPoly) delete [] fPoly;}
void GetCoeff(Int_t i, Double_t &x, Double_t &y, Double_t &b, Double_t &c, Double_t &d)

Author: Federico Carminati 28/02/2000
Last update: root/graf:$Name: $:$Id: TSpline.cxx,v 1.18 2006/10/20 21:07:40 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.