c_cpp ROOT积分TGraph

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp ROOT积分TGraph相关的知识,希望对你有一定的参考价值。

double x[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
double y[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
TGraph g(10, x, y);
TF1 f1("f",[&](double *x, double *){ return g.Eval(x[0]);}, 1, 10, 0);
double integral = f1.Integral(1, 10);

以上是关于c_cpp ROOT积分TGraph的主要内容,如果未能解决你的问题,请参考以下文章