| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Functions
3DoubleFuncTest.cpp File Reference

Test file for the class Adapter3DoubleFunction. More...

`#include <cmath>`
`#include <cstdio>`
`#include "GaudiMath/Adapters.h"`
`#include "GaudiMath/GaudiMath.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 27 of file 3DoubleFuncTest.cpp.

28 {
29 const GaudiMath::Function& mysum = GaudiMath::adapter( sum );
30 Genfun::Argument arg( 3 );
31
32 std::string format( "x=%6.5f y=%6.5f z=%6.5f mysum=%+.10f" );
33 format += " sum=%+.10f sum-mysum=%+.10f \n";
34
35 for ( double x = 0; x < 3; ++x ) {
36 for ( double y = 0; y < 3; ++y ) {
37 for ( double z = 0; z < 3; ++z ) {
38 arg[0] = x;
39 arg[1] = y;
40 arg[2] = z;
41 printf( format.c_str(), x, y, z, mysum( arg ), sum( x, y, z ), sum( x, y, z ) - mysum( arg ) );
42 }
43 }
44 }
45
46 exit( 0 );
47 }
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
sum
double sum(double x, double y, double z)
Definition: 3DoubleFuncTest.cpp:25
GaudiMath::Function
Genfun::AbsFunction Function
Definition: GaudiMath.h:24
std::string
STL class.
std::exit
T exit(T...args)
GaudiMath::adapter
GAUDI_API AIDAFunction adapter(const AIDA::IFunction &function)
Definition: Adapters.cpp:25
std::string::c_str
T c_str(T...args)
std::printf
T printf(T...args)

double sum | ( | double | x,
|  | double | y,
|  | double | z
| ) |  |

Definition at line 25 of file 3DoubleFuncTest.cpp.

25 { return 3 * x * x - 5 * y * y + 3 * z * z; }