Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JResultTransformer.hh
Go to the documentation of this file.
1#ifndef __JTOOLS__JRESULTTRANSFORMER__
2#define __JTOOLS__JRESULTTRANSFORMER__
3
5#include "JTools/JResult.hh"
6
7
8/**
9 * \author mdejong
10 */
11
12namespace JTOOLS {}
13namespace JPP { using namespace JTOOLS; }
14
15namespace JTOOLS {
16
17 /**
18 * Auxiliary class to handle multidimensional map transformations for given result type.
19 */
20 template<class JResult_t>
22
23 typedef JResult_t result_type;
24
25 template<unsigned int N, class JArgument_t>
32 };
33
34
35 /**
36 * Auxiliary class to handle multidimensional map transformations for given result type.
37 */
38 template<class JResult_t>
39 struct JResultTransformer< JResultHesse<JResult_t> > {
40
42
43 template<unsigned int N, class JArgument_t>
46 const result_type& result)
47 {
48 const JArgument_t z = transformer.getXn(array, 1.0) - transformer.getXn(array, 0.0);
49
50 result_type value(result);
51
52 value.fp /= z;
53
54 return value;
55 }
56 };
57
58
59 /**
60 * Auxiliary class to handle multidimensional map transformations for given result type.
61 */
62 template<class JResult_t>
63 struct JResultTransformer< JResultPDF<JResult_t> > {
64
66
67 template<unsigned int N, class JArgument_t>
70 const result_type& result)
71 {
72 typedef JArgument_t argument_type;
73
74 const argument_type z = transformer.getXn(array, 1.0) - transformer.getXn(array, 0.0);
75
76 result_type value(result);
77
78 value.fp /= z;
79 value.v *= z;
80 value.V *= z;
81
82 return value;
83 }
84 };
85}
86
87#endif
This include file containes various data structures that can be used as specific return types for the...
One dimensional array of template objects with fixed length.
Definition JArray.hh:43
Interface for weight application and coordinate transformation of function.
virtual argument_type getXn(const_array_type &buffer, const argument_type xn) const =0
Evaluate xn value as a function of {x0, ..., xn-1}.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for multi-dimensional interpolations and histograms.
return result
Definition JPolint.hh:862
JResult_t fp
first derivative
Definition JResult.hh:195
Data structure for result including value and first derivative of function.
Definition JResult.hh:215
Data structure for result including value, first derivative and integrals of function.
Definition JResult.hh:339
JResult_t V
integral <xmin,xmax>
Definition JResult.hh:516
JResult_t fp
first derivative
Definition JResult.hh:514
JResult_t v
integral <xmin,x]
Definition JResult.hh:515
static result_type transform(const JMultiMapTransformer< N, JArgument_t > &transformer, typename JMultiMapTransformer< N, JArgument_t >::const_array_type array, const result_type &result)
static result_type transform(const JMultiMapTransformer< N, JArgument_t > &transformer, typename JMultiMapTransformer< N, JArgument_t >::const_array_type array, const result_type &result)
Auxiliary class to handle multidimensional map transformations for given result type.
static result_type transform(const JMultiMapTransformer< N, JArgument_t > &transformer, typename JMultiMapTransformer< N, JArgument_t >::const_array_type array, const result_type &result)