35 inline double f3(
const double x,
39 const double u = 1.0e2 / (
x*
x);
41 return exp(-0.5*(y*y)/(u*u) - 0.5*(z*z)/(u*u));
52int main(
int argc,
char **argv)
62 JParser<> zap(
"Example program to test interpolation between 2D tables.");
69 catch(
const exception &error) {
70 FATAL(error.what() << endl);
90 for (
int i = 0; i != X.
getSize(); ++i) {
92 DEBUG(
"table[" << i <<
"]" << endl);
94 const double x = X.
getX(i);
96 JTable2D_t& table = buffer[x];
98 for (
int __i = 0; __i != NY; ++__i) {
99 for (
int __j = 0; __j != NZ; ++__j) {
101 const double y = Y.
getX(__i);
102 const double z = Z.
getX(__j);
104 table[__i][__j] =
f3(x,y,z);
122 for (JMultiFunction_t::iterator i = g2.begin(); i != g2.end(); ++i) {
123 i->getY().configure(Z);
134 for (
int i = 0; i != numberOfEvents; ++i) {
140 const double v =
f3(x,y,z);
150 const double w1 = buffer(x)[__i][__j];
159 const JTable2D_t& table = buffer(x);
161 for (
int __i = 0; __i != Y.
getSize(); ++__i) {
162 for (
int __j = 0; __j != Z.
getSize(); ++__j) {
163 g2.getY(__i).getY(__j) = table[__i][__j];
169 const double w2 = g2(y,z);
180 cout << i->getTitle() << endl;
181 cout <<
"mean " <<
SCIENTIFIC(10,2) << i->getMean() << endl;
182 cout <<
"RMS " <<
SCIENTIFIC(10,2) << i->getSTDev() << endl;
186 i->print(cout,
true, micro_t);
The elements in a collection are sorted according to their abscissa values and a given distance opera...
Various implementations of functional maps.
General purpose messaging.
#define DEBUG(A)
Message macros.
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.
I/O formatting auxiliaries.
int main(int argc, char **argv)
Auxiliary class for CPU timing and usage.
const std::string & getTitle() const
Get title.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Auxiliary data structure for floating point format specification.