42 result_type(
const double __f,
95 inline result_type operator()(
const double x,
99 return result_type(f (x) * f (y) * f (z),
100 fp(x) * f (y) * f (z),
101 f (x) * fp(y) * f (z),
102 f (x) * f (y) * fp(z));
113 inline double f(
const double x)
const
115 return __f1.getValue(x);
125 inline double fp(
const double x)
const
127 return __f1.getDerivative(x);
142 template<
class JMultiFunction_t>
155 JParser<> zap(
"Example program to test multi-dimensional interpolation with derivatives.");
164 catch(
const exception &error) {
169 if (numberOfEvents <= 0) {
FATAL(
"Number of events " << numberOfEvents <<
endl); }
173 const JFunction3D
f3(f1);
175 const double xmin = -1.0;
176 const double xmax = +1.0;
182 for (
double x = xmin;
x < xmax + 0.5*
dx;
x +=
dx) {
183 for (
double y = xmin;
y < xmax + 0.5*
dx;
y +=
dx) {
184 for (
double z = xmin; z < xmax + 0.5*
dx; z +=
dx) {
199 for (
int i = 0; i != numberOfEvents; ++i) {
201 const double x =
gRandom->Uniform(xmin, xmax);
202 const double y =
gRandom->Uniform(xmin, xmax);
203 const double z =
gRandom->Uniform(xmin, xmax);
205 const JFunction3D ::result_type
u =
f3(x,y,z);
206 const typename JMultiFunction_t::result_type v =
g3(x,y,z);
208 f .put(
u.f - v.f .f .f);
209 fx.put(
u.fx - v.fp.f .f);
210 fy.put(
u.fy - v.f .fp.f);
211 fz.put(
u.fz - v.f .f .fp);
216 for (
const JStats* p : { &f, &fx, &fy, &fz }) {
217 p->print(
cout, p == &f);
Various implementations of functional maps.
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
double f3(const double x, const double y, const double z)
3D function.
int main(int argc, char **argv)
int numberOfBins
number of bins for average CDF integral of optical module
Template definition of a multi-dimensional oscillation probability interpolation table.
const parameter_list< JPolynome< ID_t, 0 > > JPolynome< ID_t, 0 >::parameters & JPolynome
Set parameters.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Recursive template class for polynomial function.