74     JObject& mul(
const double factor)
 
   95       out << showpos << 
FIXED(5,2) << 
object.x << 
' '  
   96           << showpos << 
FIXED(5,2) << 
object.y << 
' '  
   97           << showpos << 
FIXED(5,2) << 
object.z;
 
  127     JParser<> zap(
"Example program to test user class with arithmetic capabilities.");
 
  135   catch(
const exception &error) {
 
  136     FATAL(error.what() << endl);
 
  142   const Double_t xmin = -1.0;
 
  143   const Double_t xmax = +1.0;
 
  146   const JObject A(gRandom->Uniform(xmin, xmax),
 
  147                   gRandom->Uniform(xmin, xmax),
 
  148                   gRandom->Uniform(xmin, xmax));
 
  150   const JObject B(gRandom->Uniform(xmin, xmax),
 
  151                   gRandom->Uniform(xmin, xmax),
 
  152                   gRandom->Uniform(xmin, xmax));
 
  159   DEBUG(
"B           " << B << endl);
 
  160   DEBUG(
"A + B     = " << 
C << endl);
 
  161   DEBUG(
"A * alpha = " << 
D << endl);
 
  162   DEBUG(
"interpolate " << 
E << endl);
 
  164   ASSERT(fabs(
C.x - (
A.x + B.x)) <= precision, 
"test of addition");
 
  165   ASSERT(fabs(
C.y - (
A.y + B.y)) <= precision, 
"test of addition");
 
  166   ASSERT(fabs(
C.z - (
A.z + B.z)) <= precision, 
"test of addition");
 
  168   ASSERT(fabs(
D.x - (
A.x * alpha)) <= precision, 
"test of multiplication");
 
  169   ASSERT(fabs(
D.y - (
A.y * alpha)) <= precision, 
"test of multiplication");
 
  170   ASSERT(fabs(
D.z - (
A.z * alpha)) <= precision, 
"test of multiplication");
 
  172   ASSERT(fabs(
E.x - (
A.x * (1.0 - alpha) + B.x * alpha)) <= precision, 
"test of interpolation");
 
  173   ASSERT(fabs(
E.y - (
A.y * (1.0 - alpha) + B.y * alpha)) <= precision, 
"test of interpolation");
 
  174   ASSERT(fabs(
E.z - (
A.z * (1.0 - alpha) + B.z * alpha)) <= precision, 
"test of interpolation");
 
  185     for (
int i = 0; i != 
N; ++i) {
 
  187       buffer.push_back(
JObject(gRandom->Uniform(xmin, xmax),
 
  188                                gRandom->Uniform(xmin, xmax),
 
  189                                gRandom->Uniform(xmin, xmax)));
 
  191       x += buffer.rbegin()->x;
 
  192       y += buffer.rbegin()->y;
 
  193       z += buffer.rbegin()->z;
 
  202     DEBUG(
"U           " << U              << endl);
 
  205     ASSERT(fabs(U.x - x) <= precision, 
"test of averaging");
 
  206     ASSERT(fabs(U.y - y) <= precision, 
"test of averaging");
 
  207     ASSERT(fabs(U.z - z) <= precision, 
"test of averaging");
 
  211     double buffer[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 };
 
Utility class to parse command line options. 
 
do echo Generating $dir eval D
 
Auxiliary base class for aritmetic operations of derived class types. 
 
JObject()
Default constructor. 
 
T interpolate(const T &first, const T &second, const double alpha)
Interpolation between objects. 
 
std::iterator_traits< T >::value_type getAverage(T __begin, T __end)
Get average. 
 
Auxiliary data structure for floating point format specification. 
 
static const double C
Physics constants. 
 
#define ASSERT(A,...)
Assert macro. 
 
I/O formatting auxiliaries. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
Auxiliary base class for inline creation of a static value or clone from a temporary object...
 
General purpose messaging. 
 
Utility class to parse command line options. 
 
Base class for data structures with artithmetic capabilities. 
 
then usage $script[input file[working directory[option]]] nWhere option can be N
 
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
 
then usage $script[input file[working directory[option]]] nWhere option can be E
 
#define DEBUG(A)
Message macros. 
 
int main(int argc, char *argv[])