All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
3DoubleFuncTest.cpp File Reference

Test file for the class Adapter3DoubleFunction. More...

#include <math.h>
#include <stdio.h>
#include "GaudiMath/GaudiMath.h"
#include "GaudiMath/Adapters.h"
Include dependency graph for 3DoubleFuncTest.cpp:

Go to the source code of this file.

Functions

double sum (double x, double y, double z)
 
int main ()
 

Detailed Description

Test file for the class Adapter3DoubleFunction.

Date
2003-09-03
Author
Kirill Miklyaev kiril.nosp@m.lm@i.nosp@m.ris1..nosp@m.itep.nosp@m..ru

Definition in file 3DoubleFuncTest.cpp.

Function Documentation

int main ( )

Definition at line 31 of file 3DoubleFuncTest.cpp.

32 {
34  Genfun::Argument arg(3);
35 
36  std::string format( "x=%6.5f y=%6.5f z=%6.5f mysum=%+.10f");
37  format +=" sum=%+.10f sum-mysum=%+.10f \n" ;
38 
39  for ( double x = 0; x < 3; ++x)
40  {
41  for (double y = 0; y < 3; ++y)
42  {
43  for (double z = 0; z < 3; ++z)
44  {
45  arg[0] = x;
46  arg[1] = y;
47  arg[2] = z;
48  printf ( format.c_str() ,
49  x, y, z, mysum(arg), sum(x, y, z),
50  sum(x, y, z) - mysum(arg) );
51  }
52  }
53  }
54 
55  exit(0);
56 
57 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:133
double sum(double x, double y, double z)
Genfun::AbsFunction Function
Definition: GaudiMath.h:26
GAUDI_API AIDAFunction adapter(const AIDA::IFunction &function)
Definition: Adapters.cpp:28
double sum ( double  x,
double  y,
double  z 
)

Definition at line 26 of file 3DoubleFuncTest.cpp.

27 {
28  return 3 * x * x - 5 * y * y + 3 * z * z;
29 }