GeoModel - GeoModelCore
FunctionNoop.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/FunctionNoop.h"
8 
9 namespace GeoGenfun {
10 FUNCTION_OBJECT_IMP(FunctionNoop)
11 
12 FunctionNoop::FunctionNoop(const AbsFunction *arg1):
13 _arg1(arg1->clone())
14 {
15 }
16 
17 FunctionNoop::FunctionNoop(const FunctionNoop & right):
18  AbsFunction(right), _arg1(right._arg1->clone())
19 {
20 }
21 
22 
23 FunctionNoop::~FunctionNoop()
24 {
25  delete _arg1;
26 }
27 
28 unsigned int FunctionNoop::dimensionality() const {
29  return _arg1->dimensionality();
30 }
31 
32 
33 double FunctionNoop::operator ()(double x) const
34 {
35  return +((*_arg1)(x));
36 }
37 
38 double FunctionNoop::operator ()(const Argument & x) const
39 {
40  return +((*_arg1)(x));
41 }
42 
43 
44 Derivative FunctionNoop::partial(unsigned int index) const {
45  return _arg1->partial(index);
46 }
47 
48 } // namespace GeoGenfun
Definition: Abs.h:15