ECF 1.7
Exp.h
1#ifndef CGPExp_h
2#define CGPExp_h
3#include "Function.h"
4namespace Cartesian
5{
6 template <class T>
7 class ExpT : public Function
8 {
9 public:
10 ExpT();
11 ~ExpT();
12
13 void evaluate(std::vector<T>& inputs, T& result);
14 };
15
16 typedef ExpT<double> Exp;
17
18 template <class T>
19 ExpT<T>::ExpT()
20 {
21 name_ = "exp";
22 nArguments_ = 1;
23 }
24
25
26 template <class T>
27 ExpT<T>::~ExpT()
28 {}
29
30 template <class T>
31 void ExpT<T>::evaluate(std::vector<T>& inputs, T& result)
32 {
33 result = exp(inputs[0]);
34 }
35
36}
37#endif //Exp_h