UnaryScalar.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2004 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/MEAL/MEAL/UnaryScalar.h
10
11#ifndef __MEAL_UnaryScalar_H
12#define __MEAL_UnaryScalar_H
13
14#include "MEAL/UnaryRule.h"
15#include "MEAL/Scalar.h"
16
17namespace MEAL {
18
20
21 class UnaryScalar : public UnaryRule<Scalar>
22 {
23
24 public:
25
27 virtual double function (double x) const = 0;
28
30 virtual double dfdx (double x) const = 0;
31
32 protected:
33
34 // ///////////////////////////////////////////////////////////////////
35 //
36 // Optimized implementation
37 //
38 // ///////////////////////////////////////////////////////////////////
39
41 void calculate (double& result, std::vector<double>* gradient);
42
43 };
44
45}
46
47#endif
UnaryRule()
Definition UnaryRule.h:27
Abstract base class of unary functions of another Scalar function.
Definition UnaryScalar.h:22
virtual double function(double x) const =0
The function.
virtual double dfdx(double x) const =0
And its first derivative.
void calculate(double &result, std::vector< double > *gradient)
Return the result and its gradient.
Definition UnaryScalar.C:11
Namespace in which all modeling and calibration related code is declared.
Definition ExampleComplex2.h:16

Generated using doxygen 1.14.0