CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

AbsFunction.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: AbsFunction.cc,v 1.4 2007/01/21 20:20:41 boudreau Exp $
21 #include <assert.h>
22 namespace Genfun {
24 }
25 
27 }
28 
30  return FunctionComposition(this, &function);
31 }
32 
34  return ParameterComposition(this, &p);
35 }
36 
37 Derivative AbsFunction::partial(unsigned int index) const {
38  FunctionNumDeriv fPrime(this,index);
39  return Derivative(&fPrime);
40 }
41 
42 
44  return partial(v.index());
45 }
46 
48  assert(dimensionality()==1);
49  return partial(0);
50 }
51 
53  return FunctionSum(&a,&b);
54 }
55 
57  return FunctionDifference(&a,&b);
58 }
59 
61  return FunctionProduct(&a,&b);
62 }
63 
65  return FunctionQuotient(&a,&b);
66 }
67 
68 FunctionConvolution convolve (const AbsFunction & a, const AbsFunction & b, double x0, double x1) {
69  return FunctionConvolution(&a,&b, x0, x1);
70 }
71 
73  return FunctionNegation(&a);
74 }
75 
76 unsigned int AbsFunction::dimensionality() const {
77  return 1;
78 }
79 
81  return FunctionDirectProduct(&a,&b);
82 }
83 
85  return ConstTimesFunction(c, &op2);
86 }
87 
88 ConstPlusFunction operator + (const AbsFunction &op2, double c) {
89  return ConstPlusFunction(c,&op2);
90 }
91 
92 ConstPlusFunction operator - (const AbsFunction &op2, double c) {
93  return ConstPlusFunction(-c, &op2);
94 }
95 
97  return ConstTimesFunction(1/c,&op2);
98 }
99 
100 
102  return ConstTimesFunction(c,&op2);
103 }
104 
106  return ConstPlusFunction(c,&op2);
107 }
108 
110  return ConstMinusFunction(c,&op2);
111 }
112 
114  return ConstOverFunction(c,&op2);
115 }
116 
117 
119  return FunctionTimesParameter(&p, &f);
120 }
121 
123  return FunctionPlusParameter(&p, &f);
124 }
125 
127  GENPARAMETER MinusP = -p;
128  return FunctionPlusParameter(&MinusP, &f);
129 
130 }
131 
133  GENPARAMETER oneOverP = 1.0/p;
134  return FunctionTimesParameter(&oneOverP, &f);
135 }
136 
138  return FunctionTimesParameter(&p, &f);
139 }
140 
142  return FunctionPlusParameter(&p, &f);
143 }
144 
146  GENFUNCTION MinusF = -f;
147  return FunctionPlusParameter(&p, &MinusF);
148 }
149 
151  GENFUNCTION oneOverF = 1.0/f;
152  return FunctionTimesParameter(&p, &oneOverF);
153 }
154 } // namespace Genfun