BinaryScalar.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/BinaryScalar.h
10 
11 #ifndef __MEAL_BinaryScalar_H
12 #define __MEAL_BinaryScalar_H
13 
14 #include "MEAL/BinaryRule.h"
15 #include "MEAL/Scalar.h"
16 
17 namespace MEAL {
18 
20 
21  class BinaryScalar : public BinaryRule<Scalar>
22  {
23 
24  public:
25 
27  virtual double function (double arg1, double arg2) const = 0;
28 
30  virtual double partial_arg1 (double arg1, double arg2) const = 0;
31 
33  virtual double partial_arg2 (double arg1, double arg2) const = 0;
34 
35  protected:
36 
38  void calculate (double& result, std::vector<double>* gradient);
39 
40  };
41 
42 }
43 
44 #endif
void calculate(double &result, std::vector< double > *gradient)
Return the result and its gradient.
Definition: BinaryScalar.C:12
Namespace in which all modeling and calibration related code is declared.
Definition: ExampleComplex2.h:16
Project< Scalar > arg2
The first argument to the binary operation.
Definition: BinaryRule.h:60
Project< Scalar > arg1
The first argument to the binary operation.
Definition: BinaryRule.h:57
virtual double partial_arg2(double arg1, double arg2) const =0
The partial derivative with respect to arg2.
virtual double partial_arg1(double arg1, double arg2) const =0
The partial derivative with respect to arg1.

Generated using doxygen 1.8.17