Examples of use of the spline classes.
{
TF1 *
f =
new TF1(
"f",
"sin(x)*sin(x/10)",
a - 0.05 * (
b -
a),
b + 0.05 * (
b -
a));
for (
Int_t nnp = 2; nnp <= np; ++nnp) {
std::vector<Double_t> xx(nnp), yy(nnp);
for (
Int_t i = 0; i < nnp; ++i) {
}
delete spline5;
xx.data(),
f, nnp,
"b1e1b2e2",
f->Derivative(
a),
f->Derivative(
b),
(
f->Derivative(
a + eps) -
f->Derivative(
a)) / eps,
(
f->Derivative(
b) -
f->Derivative(
b - eps)) / eps);
delete spline3;
xx.data(), yy.data(), nnp,
"b1e1",
f->Derivative(
a),
f->Derivative(
b));
spline3->
Draw(
"lcpsame");
delete legend;
legend =
gPad->BuildLegend(0.6, 0.7, 0.88, 0.88);
}
}
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Class to create third splines to interpolate knots Arbitrary conditions can be introduced for first a...
Class to create quintic natural splines to interpolate knots Arbitrary conditions can be introduced f...
void Draw(Option_t *option="") override
Draw this function with its current attributes.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
- Author
- Federico Carminati
Definition in file splines_test.C.