57     JParser<> zap(
"Example program to test multi-dimensional interpolation.");
 
   66   catch(
const exception &error) {
 
   67     FATAL(error.what() << endl);
 
   74   const double xmin = -1.0;
 
   75   const double xmax = +1.0;
 
   76   const double dx   = (xmax - xmin) / (numberOfBins - 1);
 
   79   typedef JGridPolint3Function1D_t                          JFunction1D_t;
 
   81   typedef JMAPLIST<JPolint3FunctionalGridMap,
 
   82     JPolint3FunctionalGridMap,
 
   83     JPolint3FunctionalGridMap,
 
   84     JPolint3FunctionalGridMap>::maplist      JMaplist_t;
 
   86   typedef JMultiFunction<JFunction1D_t, JMaplist_t>         JMultiFunction_t;
 
   92   for (
double x0 = xmin; x0 <= xmax + 0.5*dx; x0 += dx) {
 
   93     for (
double x1 = xmin; x1 <= xmax + 0.5*dx; x1 += dx) {
 
   94       for (
double x2 = xmin; x2 <= xmax + 0.5*dx; x2 += dx) {
 
   95         for (
double x3 = xmin; x3 <= xmax + 0.5*dx; x3 += dx) {
 
   96           for (
double x4 = xmin; x4 <= xmax + 0.5*dx; x4 += dx) {
 
   97             g5[x0][x1][x2][x3][x4] = 
f5(x0, x1, x2, x3, x4);
 
  105   g5.setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
 
  108   ASSERT(numberOfEvents > 0);
 
  114   for (
int i = 0; i != numberOfEvents; ++i) {
 
  116     const double x0  = gRandom->Uniform(xmin, xmax);
 
  117     const double x1  = gRandom->Uniform(xmin, xmax);
 
  118     const double x2  = gRandom->Uniform(xmin, xmax);
 
  119     const double x3  = gRandom->Uniform(xmin, xmax);
 
  120     const double x4  = gRandom->Uniform(xmin, xmax);
 
  122     const double v   = 
f5(x0,x1,x2,x3,x4);
 
  126     const double w   = g5(x0,x1,x2,x3,x4);
 
  137     timer.print(cout, 1.0 / numberOfEvents);
 
  140   ASSERT(Q.getMean()  <= precision);
 
  141   ASSERT(Q.getSTDev() <= precision);
 
Utility class to parse command line options. 
 
static const JZero zero
Function object to assign zero value. 
 
#define ASSERT(A)
Assert macro. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
double f5(const double x0, const double x1, const double x2, const double x3, const double x4)
5D function.