75 JObject& mul(
const double factor)
96 out << showpos <<
FIXED(5,2) <<
object.x <<
' '
97 << showpos <<
FIXED(5,2) <<
object.y <<
' '
98 << showpos <<
FIXED(5,2) <<
object.z;
126 JParser<> zap(
"Example program to test user class with arithmetic capabilities.");
133 catch(
const exception &error) {
134 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));
154 cout <<
"A " <<
A << endl;
155 cout <<
"B " << B << endl;
156 cout <<
"interpolate " <<
interpolate(
A, B, alpha) << endl;
158 cout <<
"A + B = " <<
A + B << endl;
160 cout <<
"A * " << noshowpos <<
FIXED(5,2) << alpha <<
" = " <<
A * alpha << endl;
Utility class to parse command line options.
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.
Auxiliary data structure for floating point format specification.
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.
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
int main(int argc, char *argv[])