GeoModel - GeoModelCore
AbsParameter.cpp
1 //==========================================================================//
2 // Imported from the QAT library (qat.pitt.edu) by the copyright holder //
3 // Joe Boudreau. Software licensed under the terms and conditions of the //
4 // GNU Lesser Public License v3. //
5 //==========================================================================//
6 
7 #include "GeoGenericFunctions/AbsParameter.h"
8 #include "GeoGenericFunctions/Parameter.h"
9 namespace GeoGenfun {
10 
11 // Two do-nothing functions:
12 AbsParameter::AbsParameter() {
13 }
14 
15 AbsParameter::~AbsParameter(){
16 }
17 
18 AbsParameter::AbsParameter(const AbsParameter &)
19 {}
20 
21 AbsParameter *AbsParameter::clone() const {
22  return _clone();
23 }
24 
25 
26 ParameterSum operator + (const AbsParameter & a, const AbsParameter & b) {
27  return ParameterSum(&a,&b);
28 }
29 
30 ParameterDifference operator - (const AbsParameter & a, const AbsParameter & b) {
31  return ParameterDifference(&a,&b);
32 }
33 
34 ParameterProduct operator * (const AbsParameter & a, const AbsParameter & b) {
35  return ParameterProduct(&a,&b);
36 }
37 
38 ParameterQuotient operator / (const AbsParameter & a, const AbsParameter & b) {
39  return ParameterQuotient(&a,&b);
40 }
41 
42 
43 ParameterNegation operator - (const AbsParameter & a) {
44  return ParameterNegation(&a);
45 }
46 
47 
48 ConstTimesParameter operator * (double c, const AbsParameter &op2){
49  return ConstTimesParameter (c, &op2);
50 }
51 
52 ConstPlusParameter operator + (double c, const AbsParameter &op2){
53  return ConstPlusParameter (c, &op2);
54 }
55 
56 ConstMinusParameter operator - (double c, const AbsParameter &op2){
57  return ConstMinusParameter(c, &op2);
58 }
59 
60 ConstOverParameter operator / (double c, const AbsParameter &op2){
61  return ConstOverParameter(c, &op2);
62 }
63 
64 ConstTimesParameter operator * (const AbsParameter &op2, double c){
65  return ConstTimesParameter (c, &op2);
66 }
67 
68 ConstPlusParameter operator + (const AbsParameter &op2, double c){
69  return ConstPlusParameter (c, &op2);
70 }
71 
72 ConstPlusParameter operator - (const AbsParameter &op2, double c){
73  return ConstPlusParameter(-c, &op2);
74 }
75 
76 ConstTimesParameter operator / (const AbsParameter &op2, double c){
77  return ConstTimesParameter(1/c, &op2);
78 }
79 
80 
81 } // namespace GeoGenfun
Definition: Abs.h:15