Example program to test multi-dimensional interpolation with multi-dimensional function objects.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "TRandom3.h"
#include "JTools/JMapList.hh"
#include "JTools/JFunction1D_t.hh"
#include "JTools/JFunctionalMap_t.hh"
#include "JTools/JMultiFunction.hh"
#include "JTools/JQuantile.hh"
#include "Jeep/JTimer.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| double  | f5 (const double x0, const double x1, const double x2, const double x3, const double x4) | 
|   | 5D function.  More...
  | 
|   | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to test multi-dimensional interpolation with multi-dimensional function objects. 
- Author
 - mdejong 
 
Definition in file JPolynome3D+2D.cc.
 
  
  
      
        
          | double f5  | 
          ( | 
          const double  | 
          x0,  | 
         
        
           | 
           | 
          const double  | 
          x1,  | 
         
        
           | 
           | 
          const double  | 
          x2,  | 
         
        
           | 
           | 
          const double  | 
          x3,  | 
         
        
           | 
           | 
          const double  | 
          x4  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
5D function. 
Definition at line 22 of file JPolynome3D+2D.cc.
   28   static const double a = 1.0;
 
   29   static const double b = 1.0;
 
   30   static const double c = 1.0;
 
   33     x0 * (a + x0 * (b + c*x0))  *  
 
   34     x1 * (
a + x1 * (b + 
c*x1))  *
 
   35     x2 * (
a + x2 * (b + 
c*x2))  *
 
   36     x3 * (
a + x3 * (b + 
c*x3))  *
 
   37     x4 * (
a + x4 * (b + 
c*x4));
 
$WORKDIR ev_configure_domsimulator txt echo process $DOM_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DOM_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
 
 
 
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 46 of file JPolynome3D+2D.cc.
   56     JParser<> zap(
"Example program to test multi-dimensional interpolation with multi-dimensional function objects.");
 
   64   catch(
const exception &error) {
 
   65     FATAL(error.what() << endl);
 
   72   const double xmin = -1.0;
 
   73   const double xmax = +1.0;
 
   77   typedef JGridPolint3Function1D_t                          JFunction1D_t;
 
   79   typedef JMAPLIST<JPolint3FunctionalGridMap>::maplist      JMaplist1D_t;
 
   81   typedef JMAPLIST<JPolint3FunctionalGridMap,
 
   82                    JPolint3FunctionalGridMap,
 
   83                    JPolint3FunctionalGridMap>::maplist      JMaplist3D_t;
 
   85   typedef JMultiFunction<JFunction1D_t, JMaplist1D_t>       JFunction2D_t;
 
   86   typedef JMultiFunction<JFunction2D_t, JMaplist3D_t>       JFunction5D_t;
 
   91   for (
double x0 = 
xmin; x0 <= 
xmax + 0.5*dx; x0 += dx) {
 
   92     for (
double x1 = 
xmin; x1 <= 
xmax + 0.5*dx; x1 += dx) {
 
   93       for (
double x2 = 
xmin; x2 <= 
xmax + 0.5*dx; x2 += dx) {
 
   94         for (
double x3 = 
xmin; x3 <= 
xmax + 0.5*dx; x3 += dx) {
 
   95           for (
double x4 = 
xmin; x4 <= 
xmax + 0.5*dx; x4 += dx) {
 
   96             g5[x0][x1][x2][x3][x4] = 
f5(x0, x1, x2, x3, x4);
 
  104   g5.setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
 
  107   if (numberOfEvents > 0) {
 
  113     for (
int i = 0; i != numberOfEvents; ++i) {
 
  115       const double x0  = gRandom->Uniform(
xmin, 
xmax);
 
  116       const double x1  = gRandom->Uniform(
xmin, 
xmax);
 
  117       const double x2  = gRandom->Uniform(
xmin, 
xmax);
 
  118       const double x3  = gRandom->Uniform(
xmin, 
xmax);
 
  119       const double x4  = gRandom->Uniform(
xmin, 
xmax);
 
  121       const double v   = 
f5(x0,x1,x2,x3,x4);
 
  125       const double w   = g5(x0,x1,x2,x3,x4);
 
  134     timer.print(cout, 1.0 / numberOfEvents);
 
Utility class to parse command line options. 
 
Q(UTCMax_s-UTCMin_s)-livetime_s
 
static const JZero zero
Function object to assign zero value. 
 
#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. 
 
int numberOfBins
number of bins for average CDF integral of optical module