23 inline double f3(
const double x, 
const double y, 
const double z)
 
   25   static const double a = 1.0;
 
   26   static const double b = 1.0;
 
   27   static const double c = 1.0;
 
   30     x * (
a + 
x * (b + c*
x))  *  
 
   31     y * (
a + 
y * (b + c*
y))  *
 
   32     z * (
a + z * (b + c*z));
 
   42 int main(
int argc, 
char **argv)
 
   54     JParser<> zap(
"Example program to test multi-dimensional interpolation.");
 
   63   catch(
const exception &error) {
 
   64     FATAL(error.what() << endl);
 
   68   const double xmin = -1.0;
 
   69   const double xmax = +1.0;
 
   86       for (
double z = 
xmin; z < 
xmax + 0.5*dx; z += dx) {
 
   94   g3.setExceptionHandler(
new JFunction1D_t::JDefaultResult(
JMATH::zero));
 
   97   if (numberOfEvents > 0) {
 
  103     for (
int i = 0; i != numberOfEvents; ++i) {
 
  105       const double x  = gRandom->Uniform(
xmin, 
xmax);
 
  106       const double y  = gRandom->Uniform(
xmin, 
xmax);
 
  107       const double z  = gRandom->Uniform(
xmin, 
xmax);
 
  109       const double v  = 
f3(
x,
y,z);
 
  113       const double w  = g3(
x,
y,z);
 
  134       cout << 
"> " << flush;
 
  138       if (
getline(cin, buffer) && !buffer.empty()) {
 
  142         istringstream(buffer) >> 
x >> 
y >> z;
 
  145           cout << 
f3(
x,
y,z) << 
' ' << g3(
x,
y,z) << endl;
 
  148           cout << exception << endl;
 
Various implementations of functional maps.
 
General purpose messaging.
 
#define ASSERT(A,...)
Assert macro.
 
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
 
Auxiliary class for CPU timing and usage.
 
void print(std::ostream &out, const JScale_t scale=milli_t) const
Print timer data.
 
Utility class to parse command line options.
 
std::istream & getline(std::istream &in, JString &object)
Read string from input stream until end of line.
 
static const JZero zero
Function object to assign zero value.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).