Gyoto
GyotoFunctors.h
Go to the documentation of this file.
1 
6 /*
7  Copyright 2011 Thibaut Paumard
8 
9  This file is part of Gyoto.
10 
11  Gyoto is free software: you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  Gyoto is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
23  */
24 
25 
26 #ifndef __GyotoFunctors_H_
27 #define __GyotoFunctors_H_
28 
29 namespace Gyoto {
34  namespace Functor {
35  class Double_constDoubleArray;
36  class Double_Double_const;
37  }
38 }
39 
44 {
45  public:
49  virtual double operator()(double const data[]) = 0;
50 };
51 
52 
57 {
58  public:
62  int status;
63 
67  virtual double operator()(double) const = 0;
68 
74  double ridders(double from, double to) const;
75 
87  double secant(double from, double to);
88 };
89 
90 #endif
A functor like double (func) (double const data[])
Definition: GyotoFunctors.h:43
virtual double operator()(double) const =0
The actual function.
double secant(double from, double to)
Secant root-finding method applied on operator()()
A functor like double (func) (double) const.
Definition: GyotoFunctors.h:56
double ridders(double from, double to) const
Ridder&#39;s root-finding method applied on operator()()
int status
Exit status code of &quot;various&quot; methods (at least secant() !)
Definition: GyotoFunctors.h:62
virtual double operator()(double const data[])=0
The actual function.