73 TAttLine::operator=(
sp);
74 TAttFill::operator=(
sp);
75 TAttMarker::operator=(
sp);
169 for (i=0;i<=
fNpx;i++) {
181 for (i=1;i<=
fNpx;i++) {
199 char *o = (
char *) opt.
Data();
204 if(o[i]==
'p') graph=
kTRUE ;
else o[
j++]=o[i];
233 if (
R__b.IsReading()) {
362 fValBeg(
valbeg), fValEnd(
valend), fBegCond(0), fEndCond(0)
372 for (
Int_t i=0; i<
n; ++i) {
392 fBegCond(0), fEndCond(0)
402 for (
Int_t i=0; i<
n; ++i) {
421 fBegCond(0), fEndCond(0)
431 for (
Int_t i=0; i<
n; ++i) {
447 const TF1 *func,
Int_t n,
const char *opt,
451 fBegCond(0), fEndCond(0)
464 for (
Int_t i=0; i<
n; ++i) {
480 const TGraph *
g,
const char *opt,
484 fBegCond(0), fEndCond(0)
496 g->GetPoint(i,
xx,
yy);
514 fBegCond(0), fEndCond(0)
525 fPoly[i].
X()=
h->GetXaxis()->GetBinCenter(i+1);
526 fPoly[i].
Y()=
h->GetBinContent(i+1);
539 :
TSpline(
sp3), fValBeg(
sp3.fValBeg), fValEnd(
sp3.fValEnd), fBegCond(
sp3.fBegCond), fEndCond(
sp3.fEndCond)
576 const char *b1 =
strstr(opt,
"b1");
578 const char *b2 =
strstr(opt,
"b2");
581 Error(
"SetCond",
"Cannot specify first and second derivative at first point");
583 Error(
"SetCond",
"Cannot specify first and second derivative at last point");
623 printf(
"1 TEST OF TSpline3 WITH NONEQUIDISTANT KNOTS\n");
640 for (i = 0; i <
n; ++i)
641 spline->GetCoeff(i,
hx,
a[i],
a[i+200],
a[i+400],
a[i+600]);
643 for (i = 0; i <
mm1; ++i)
diff[i] =
com[i] = 0;
644 for (k = 0; k <
n; ++k) {
645 for (i = 0; i < mm; ++i)
c[i] =
a[k+i*200];
646 printf(
" ---------------------------------------%3d --------------------------------------------\n",k+1);
651 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
653 for (i = 0; i <
mm1; ++i)
656 for (i = 1; i < mm; ++i)
657 for (
jj = i;
jj < mm; ++
jj) {
661 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
663 for (i = 0; i <
mm1; ++i)
664 if (!(k >=
n-2 && i != 0))
669 printf(
" MAXIMUM ABSOLUTE VALUES OF DIFFERENCES \n");
672 printf(
" MAXIMUM ABSOLUTE VALUES OF COEFFICIENTS \n");
678 for (
n = 10;
n <= 100;
n += 10) {
682 for (i = 0; i <
nm1; i += 2) {
694 for (i = 0; i <
n; ++i)
697 for (i = 0; i <
mm1; ++i)
699 for (k = 0; k <
n; ++k) {
700 for (i = 0; i < mm; ++i)
703 printf(
" ---------------------------------------%3d --------------------------------------------\n",k+1);
705 if (k ==
n-1)
printf(
"%16.8f\n",
c[0]);
709 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
712 for (i = 0; i <
mm1; ++i)
716 for (i = 1; i < mm; ++i)
717 for (
jj = i;
jj < mm; ++
jj) {
722 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
725 for (i = 0; i <
mm1; ++i)
726 if (!(k >=
n-2 && i != 0))
730 printf(
" MAXIMUM ABSOLUTE VALUES OF DIFFERENCES \n");
733 printf(
" MAXIMUM ABSOLUTE VALUES OF COEFFICIENTS \n");
776 "Binary search failed x(%d) = %f < x= %f < x(%d) = %f\n",
810 std::ofstream *
f =
new std::ofstream(
filename,std::ios::out);
820 char *dot =
strstr(buffer,
".");
822 strlcat(buffer,
"(double x) {\n",512);
831 snprintf(buffer,512,
" const double fX[%d] = {",
fNp);
836 for (i=0;i<
fNp;i++) {
841 if (i%5 == 4 || i ==
fNp-1) {
849 snprintf(buffer,512,
" const double fY[%d] = {",
fNp);
852 for (i=0;i<
fNp;i++) {
857 if (i%5 == 4 || i ==
fNp-1) {
865 snprintf(buffer,512,
" const double fB[%d] = {",
fNp);
868 for (i=0;i<
fNp;i++) {
873 if (i%5 == 4 || i ==
fNp-1) {
881 snprintf(buffer,512,
" const double fC[%d] = {",
fNp);
884 for (i=0;i<
fNp;i++) {
889 if (i%5 == 4 || i ==
fNp-1) {
897 snprintf(buffer,512,
" const double fD[%d] = {",
fNp);
900 for (i=0;i<
fNp;i++) {
905 if (i%5 == 4 || i ==
fNp-1) {
914 snprintf(buffer,512,
" int klow=0;\n");
917 snprintf(buffer,512,
" // If out of boundaries, extrapolate. It may be badly wrong\n");
918 snprintf(buffer,512,
" if(x<=fXmin) klow=0;\n");
920 snprintf(buffer,512,
" else if(x>=fXmax) klow=fNp-1;\n");
924 snprintf(buffer,512,
" if(fKstep) {\n");
927 snprintf(buffer,512,
" // Equidistant knots, use histogramming\n");
929 snprintf(buffer,512,
" klow = int((x-fXmin)/fDelta);\n");
931 snprintf(buffer,512,
" if (klow > fNp-1) klow = fNp-1;\n");
935 snprintf(buffer,512,
" int khig=fNp-1, khalf;\n");
938 snprintf(buffer,512,
" // Non equidistant knots, binary search\n");
940 snprintf(buffer,512,
" while(khig-klow>1)\n");
942 snprintf(buffer,512,
" if(x>fX[khalf=(klow+khig)/2]) klow=khalf;\n");
944 snprintf(buffer,512,
" else khig=khalf;\n");
950 snprintf(buffer,512,
" // Evaluate now\n");
952 snprintf(buffer,512,
" double dx=x-fX[klow];\n");
954 snprintf(buffer,512,
" return (fY[klow]+dx*(fB[klow]+dx*(fC[klow]+dx*fD[klow])));\n");
960 if (
f) {
f->close();
delete f;}
979 out <<
" spline3->SetNpx(" <<
fNpx <<
");\n";
982 out <<
" spline3->SetPoint(" << i <<
"," <<
fPoly[i].
X() <<
"," <<
fPoly[i].
Y() <<
");\n";
983 out <<
" spline3->SetPointCoeff(" << i <<
"," <<
fPoly[i].
B() <<
"," <<
fPoly[i].
C() <<
"," <<
fPoly[i].
D()
1089 for (
m=1;
m<
l; ++
m) {
1158 for (i=1; i<
fNp; ++i) {
1172 if (
R__b.IsReading()) {
1226 for (
Int_t i=0; i<
n; ++i) {
1260 for (
Int_t i=0; i<
n; ++i) {
1293 for (
Int_t i=0; i<
n; i++) {
1327 for (
Int_t i=0; i<
n; ++i) {
1364 g->GetPoint(i,
xx,
yy);
1397 fPoly[i+
beg].
X()=
h->GetXaxis()->GetBinCenter(i+1);
1445 const char *&
cb1,
const char *&
ce1,
1446 const char *&
cb2,
const char *&
ce2)
1476 const char *
cb1,
const char *
ce1,
const char *
cb2,
1551 "Binary search failed x(%d) = %f < x(%d) = %f\n",
1582 std::ofstream *
f =
new std::ofstream(
filename,std::ios::out);
1592 char *dot =
strstr(buffer,
".");
1594 strlcat(buffer,
"(double x) {\n",512);
1603 snprintf(buffer,512,
" const double fX[%d] = {",
fNp);
1608 for (i=0;i<
fNp;i++) {
1613 if (i%5 == 4 || i ==
fNp-1) {
1621 snprintf(buffer,512,
" const double fY[%d] = {",
fNp);
1624 for (i=0;i<
fNp;i++) {
1629 if (i%5 == 4 || i ==
fNp-1) {
1637 snprintf(buffer,512,
" const double fB[%d] = {",
fNp);
1640 for (i=0;i<
fNp;i++) {
1645 if (i%5 == 4 || i ==
fNp-1) {
1653 snprintf(buffer,512,
" const double fC[%d] = {",
fNp);
1656 for (i=0;i<
fNp;i++) {
1661 if (i%5 == 4 || i ==
fNp-1) {
1669 snprintf(buffer,512,
" const double fD[%d] = {",
fNp);
1672 for (i=0;i<
fNp;i++) {
1677 if (i%5 == 4 || i ==
fNp-1) {
1685 snprintf(buffer,512,
" const double fE[%d] = {",
fNp);
1688 for (i=0;i<
fNp;i++) {
1693 if (i%5 == 4 || i ==
fNp-1) {
1701 snprintf(buffer,512,
" const double fF[%d] = {",
fNp);
1704 for (i=0;i<
fNp;i++) {
1709 if (i%5 == 4 || i ==
fNp-1) {
1718 snprintf(buffer,512,
" int klow=0;\n");
1721 snprintf(buffer,512,
" // If out of boundaries, extrapolate. It may be badly wrong\n");
1722 snprintf(buffer,512,
" if(x<=fXmin) klow=0;\n");
1724 snprintf(buffer,512,
" else if(x>=fXmax) klow=fNp-1;\n");
1728 snprintf(buffer,512,
" if(fKstep) {\n");
1731 snprintf(buffer,512,
" // Equidistant knots, use histogramming\n");
1733 snprintf(buffer,512,
" klow = int((x-fXmin)/fDelta);\n");
1735 snprintf(buffer,512,
" if (klow > fNp-1) klow = fNp-1;\n");
1737 snprintf(buffer,512,
" } else {\n");
1739 snprintf(buffer,512,
" int khig=fNp-1, khalf;\n");
1742 snprintf(buffer,512,
" // Non equidistant knots, binary search\n");
1744 snprintf(buffer,512,
" while(khig-klow>1)\n");
1746 snprintf(buffer,512,
" if(x>fX[khalf=(klow+khig)/2]) klow=khalf;\n");
1748 snprintf(buffer,512,
" else khig=khalf;\n");
1754 snprintf(buffer,512,
" // Evaluate now\n");
1756 snprintf(buffer,512,
" double dx=x-fX[klow];\n");
1758 snprintf(buffer,512,
" return (fY[klow]+dx*(fB[klow]+dx*(fC[klow]+dx*(fD[klow]+dx*(fE[klow]+dx*fF[klow])))));\n");
1764 if (
f) {
f->close();
delete f;}
1778 TString::Format(
"\"%s\", %g, %g, (TF1 *)nullptr, %d, \"\", %g, %g, %g, %g",
1788 out <<
" spline5->SetNpx(" <<
fNpx <<
");\n";
1791 out <<
" spline5->SetPoint(" << i <<
"," <<
fPoly[i].
X() <<
"," <<
fPoly[i].
Y() <<
");\n";
1792 out <<
" spline5->SetPointCoeff(" << i <<
"," <<
fPoly[i].
B() <<
"," <<
fPoly[i].
C() <<
"," <<
fPoly[i].
D()
1793 <<
"," <<
fPoly[i].
E() <<
"," <<
fPoly[i].
F() <<
");\n";
1924 for (i = 1; i <
m; ++i) {
1954 for (i = 1; i <
fNp; ++i) {
1963 for (i = 2; i <
fNp; ++i) {
1981 for (i = 2; i <
m; ++i) {
1994 for (i=
fNp-3; i > 0; --i)
2012 for (i = 1; i <
m; ++i) {
2090 printf(
"1 TEST OF TSpline5 WITH NONEQUIDISTANT KNOTS\n");
2107 for (i = 0; i <
n; ++i)
2109 a[i+600],
a[i+800],
a[i+1000]);
2111 for (i = 0; i <
mm1; ++i)
diff[i] =
com[i] = 0;
2112 for (k = 0; k <
n; ++k) {
2113 for (i = 0; i < mm; ++i)
c[i] =
a[k+i*200];
2114 printf(
" ---------------------------------------%3d --------------------------------------------\n",k+1);
2119 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2121 for (i = 0; i <
mm1; ++i)
2124 for (i = 1; i < mm; ++i)
2125 for (
jj = i;
jj < mm; ++
jj) {
2127 c[
j-2] =
c[
j-1]*z+
c[
j-2];
2129 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2131 for (i = 0; i <
mm1; ++i)
2132 if (!(k >=
n-2 && i != 0))
2137 printf(
" MAXIMUM ABSOLUTE VALUES OF DIFFERENCES \n");
2140 printf(
" MAXIMUM ABSOLUTE VALUES OF COEFFICIENTS \n");
2146 for (
n = 10;
n <= 100;
n += 10) {
2150 for (i = 0; i <
nm1; i += 2) {
2162 for (i = 0; i <
n; ++i)
2164 a[i+600],
a[i+800],
a[i+1000]);
2166 for (i = 0; i <
mm1; ++i)
2168 for (k = 0; k <
n; ++k) {
2169 for (i = 0; i < mm; ++i)
2172 printf(
" ---------------------------------------%3d --------------------------------------------\n",k+1);
2174 if (k ==
n-1)
printf(
"%16.8f\n",
c[0]);
2176 if (k ==
n-1)
break;
2178 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2181 for (i = 0; i <
mm1; ++i)
2185 for (i = 1; i < mm; ++i)
2186 for (
jj = i;
jj < mm; ++
jj) {
2188 c[
j-2] =
c[
j-1]*z+
c[
j-2];
2191 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2194 for (i = 0; i <
mm1; ++i)
2195 if (!(k >=
n-2 && i != 0))
2199 printf(
" MAXIMUM ABSOLUTE VALUES OF DIFFERENCES \n");
2202 printf(
" MAXIMUM ABSOLUTE VALUES OF COEFFICIENTS \n");
2210 printf(
"1 TEST OF TSpline5 WITH NONEQUIDISTANT DOUBLE KNOTS\n");
2238 for (i = 0; i < nn; ++i)
2240 a[i+600],
a[i+800],
a[i+1000]);
2242 for (i = 0; i <
mm1; ++i)
2244 for (k = 0; k < nn; ++k) {
2245 for (i = 0; i < mm; ++i)
2247 printf(
" ---------------------------------------%3d --------------------------------------------\n",k+1);
2253 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2255 for (i = 0; i <
mm1; ++i)
2258 for (i = 1; i < mm; ++i)
2259 for (
jj = i;
jj < mm; ++
jj) {
2261 c[
j-2] =
c[
j-1]*z+
c[
j-2];
2263 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2265 for (i = 0; i <
mm1; ++i)
2266 if (!(k >= nn-2 && i != 0))
2270 printf(
" MAXIMUM ABSOLUTE VALUES OF DIFFERENCES \n");
2271 for (i = 1; i <=
mm1; ++i) {
2277 printf(
" MAXIMUM ABSOLUTE VALUES OF COEFFICIENTS \n");
2281 for (
n = 10;
n <= 100;
n += 10) {
2286 for (i = 0; i <
n; ++i) {
2295 for (i = 0; i < nn; ++i)
2297 a[i+600],
a[i+800],
a[i+1000]);
2299 for (i = 0; i <
mm1; ++i)
2301 for (k = 0; k < nn; ++k) {
2302 for (i = 0; i < mm; ++i)
2305 printf(
" ---------------------------------------%3d --------------------------------------------\n",k+1);
2307 if (k == nn-1)
printf(
"%16.8f\n",
c[0]);
2309 if (k == nn-1)
break;
2311 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2314 for (i = 0; i <
mm1; ++i)
2317 for (i = 1; i < mm; ++i) {
2318 for (
jj = i;
jj < mm; ++
jj) {
2320 c[
j-2] =
c[
j-1]*z+
c[
j-2];
2324 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2327 for (i = 0; i <
mm1; ++i)
2328 if (!(k >= nn-2 && i != 0))
2332 printf(
" MAXIMUM ABSOLUTE VALUES OF DIFFERENCES \n");
2335 printf(
" MAXIMUM ABSOLUTE VALUES OF COEFFICIENTS \n");
2344 printf(
"1 TEST OF TSpline5 WITH NONEQUIDISTANT KNOTS,\n");
2345 printf(
" ONE DOUBLE, ONE TRIPLE KNOT\n");
2368 for (i = 0; i <
n; ++i)
2370 a[i+600],
a[i+800],
a[i+1000]);
2372 for (i = 0; i <
mm1; ++i)
2374 for (k = 0; k <
n; ++k) {
2375 for (i = 0; i < mm; ++i)
2377 printf(
" ---------------------------------------%3d --------------------------------------------\n",k+1);
2383 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2385 for (i = 0; i <
mm1; ++i)
2388 for (i = 1; i < mm; ++i)
2389 for (
jj = i;
jj < mm; ++
jj) {
2391 c[
j-2] =
c[
j-1]*z+
c[
j-2];
2393 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2395 for (i = 0; i <
mm1; ++i)
2396 if (!(k >=
n-2 && i != 0))
2400 printf(
" MAXIMUM ABSOLUTE VALUES OF DIFFERENCES \n");
2403 printf(
" MAXIMUM ABSOLUTE VALUES OF COEFFICIENTS \n");
2411 printf(
"1 TEST OF TSpline5 WITH NONEQUIDISTANT KNOTS,\n");
2412 printf(
" TWO DOUBLE, ONE TRIPLE KNOT\n");
2439 for (i = 0; i <
n; ++i)
2441 a[i+600],
a[i+800],
a[i+1000]);
2443 for (i = 0; i <
mm1; ++i)
2445 for (k = 0; k <
n; ++k) {
2446 for (i = 0; i < mm; ++i)
2448 printf(
" ---------------------------------------%3d --------------------------------------------\n",k+1);
2454 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2456 for (i = 0; i <
mm1; ++i)
2459 for (i = 1; i < mm; ++i)
2460 for (
jj = i;
jj < mm; ++
jj) {
2462 c[
j-2] =
c[
j-1]*z+
c[
j-2];
2464 for (i = 0; i < mm; ++i)
printf(
"%16.8f",
c[i]);
2466 for (i = 0; i <
mm1; ++i)
2467 if (!(k >=
n-2 && i != 0))
2471 printf(
" MAXIMUM ABSOLUTE VALUES OF DIFFERENCES \n");
2474 printf(
" MAXIMUM ABSOLUTE VALUES OF COEFFICIENTS \n");
2486 if (
R__b.IsReading()) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
R__EXTERN TSystem * gSystem
Fill Area Attributes class.
virtual void Streamer(TBuffer &)
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
virtual void Streamer(TBuffer &)
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual Style_t GetLineStyle() const
Return the line style.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void Streamer(TBuffer &)
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void SetLimits(Double_t xmin, Double_t xmax)
Buffer base class used for serializing objects.
A TGraph is an object made of two arrays X and Y with npoints each.
void Paint(Option_t *chopt="") override
Draw this graph with its current attributes.
1-D histogram with a float per channel (see TH1 documentation)
TH1 is the base class of all histogram classes in ROOT.
virtual void SetDirectory(TDirectory *dir)
By default, when a histogram is created, it is added to the list of histogram objects in the current ...
virtual Double_t GetBinCenter(Int_t bin) const
Return bin center for 1D histogram.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a line.
@ kLogX
X-axis in log scale.
@ kNoStats
Don't draw stats box.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content see convention for numbering bins in TH1::GetBin In case the bin number is greater th...
void Paint(Option_t *option="") override
Control routine to paint any kind of histograms.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
void Streamer(TBuffer &) override
Stream an object of class TObject.
const char * GetTitle() const override
Returns title of object.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
Class to create third splines to interpolate knots Arbitrary conditions can be introduced for first a...
void SaveAs(const char *filename="", Option_t *option="") const override
Write this spline as a C++ function that can be executed without ROOT the name of the function is the...
Int_t fEndCond
0=no end cond, 1=first derivative, 2=second derivative
Int_t fBegCond
0=no beg cond, 1=first derivative, 2=second derivative
Int_t FindX(Double_t x) const
Find X.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
static void Test()
Test method for TSpline5.
Double_t fValBeg
Initial value of first or second derivative.
void BuildCoeff() override
Build coefficients.
void Streamer(TBuffer &) override
Stream an object of class TSpline3.
Double_t Eval(Double_t x) const override
Eval this spline at x.
Double_t fValEnd
End value of first or second derivative.
void SetCond(const char *opt)
Check the boundary conditions.
Double_t Derivative(Double_t x) const
Derivative.
TSplinePoly3 * fPoly
[fNp] Array of polynomial terms
TSpline3 & operator=(const TSpline3 &)
Assignment operator.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set point number i.
virtual void SetPointCoeff(Int_t i, Double_t b, Double_t c, Double_t d)
Set point coefficient number i.
Class to create quintic natural splines to interpolate knots Arbitrary conditions can be introduced f...
static void Test()
Test method for TSpline5.
Double_t Eval(Double_t x) const override
Eval this spline at x.
void Streamer(TBuffer &) override
Stream an object of class TSpline5.
void BuildCoeff() override
Algorithm 600, collected algorithms from acm.
TSplinePoly5 * fPoly
[fNp] Array of polynomial terms
virtual void SetPointCoeff(Int_t i, Double_t b, Double_t c, Double_t d, Double_t e, Double_t f)
Set point coefficient number i.
void SaveAs(const char *filename="", Option_t *option="") const override
Write this spline as a C++ function that can be executed without ROOT the name of the function is the...
Double_t Derivative(Double_t x) const
Derivative.
void BoundaryConditions(const char *opt, Int_t &beg, Int_t &end, const char *&cb1, const char *&ce1, const char *&cb2, const char *&ce2)
Check the boundary conditions and the amount of extra double knots needed.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
void SetBoundaries(Double_t b1, Double_t e1, Double_t b2, Double_t e2, const char *cb1, const char *ce1, const char *cb2, const char *ce2)
Set the boundary conditions at double/triple knots.
Int_t FindX(Double_t x) const
Find X.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set point number i.
TSpline5 & operator=(const TSpline5 &)
Assignment operator.
Double_t fC
Second order expansion coefficient : fC*2! is the second derivative at x.
Double_t Eval(Double_t x) const override
Double_t fD
Third order expansion coefficient : fD*3! is the third derivative at x.
Double_t Derivative(Double_t x) const
Double_t fB
First order expansion coefficient : fB*1! is the first derivative at x.
void CopyPoly(TSplinePoly3 const &other)
Utility called by the copy constructors and = operator.
TSplinePoly3 & operator=(TSplinePoly3 const &other)
Assignment operator.
void Streamer(TBuffer &) override
Stream an object of class TObject.
void CopyPoly(TSplinePoly5 const &other)
Utility called by the copy constructors and = operator.
TSplinePoly5 & operator=(TSplinePoly5 const &other)
Assignment operator.
Double_t fF
Fifth order expansion coefficient : fF*5! is the fifth derivative at x.
Double_t Derivative(Double_t x) const
void Streamer(TBuffer &) override
Stream an object of class TObject.
Double_t fB
First order expansion coefficient : fB*1! is the first derivative at x.
Double_t fC
Second order expansion coefficient : fC*2! is the second derivative at x.
Double_t fD
Third order expansion coefficient : fD*3! is the third derivative at x.
Double_t Eval(Double_t x) const override
Double_t fE
Fourth order expansion coefficient : fE*4! is the fourth derivative at x.
Base class for TSpline knot.
void CopyPoly(TSplinePoly const &other)
Utility called by the copy constructors and = operator.
TSplinePoly & operator=(TSplinePoly const &other)
Assignment operator.
Double_t fY
Constant term.
Base class for spline implementation containing the Draw/Paint methods.
void Streamer(TBuffer &) override
Stream an object of class TSpline.
virtual Double_t Eval(Double_t x) const =0
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
TGraph * fGraph
Graph for drawing the knots.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a spline.
Double_t fXmin
Minimum value of abscissa.
TClass * IsA() const override
TH1F * fHistogram
Temporary histogram.
void Draw(Option_t *option="") override
Draw this function with its current attributes.
Double_t fDelta
Distance between equidistant knots.
virtual void GetKnot(Int_t i, Double_t &x, Double_t &y) const =0
TSpline & operator=(const TSpline &)
Assignment operator.
void Paint(Option_t *option="") override
Paint this function with its current attributes.
Bool_t fKstep
True of equidistant knots.
Int_t fNp
Number of knots.
~TSpline() override
Destructor.
Double_t fXmax
Maximum value of abscissa.
Int_t fNpx
Number of points used for graphical representation.
void ToLower()
Change string to lower-case.
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Int_t FloorNint(Double_t x)
Returns the nearest integer of TMath::Floor(x).
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.