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:
46  virtual ~Double_constDoubleArray();
50  virtual double operator()(double const data[]) = 0;
51 };
52 
53 
58 {
59  public:
60  virtual ~Double_Double_const();
64  int status;
65 
69  virtual double operator()(double) const = 0;
70 
76  double ridders(double from, double to) const;
77 
89  double secant(double from, double to);
90 };
91 
92 #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:57
double ridders(double from, double to) const
Ridder&#39;s root-finding method applied on operator()()
int status
Exit status code of "various" methods (at least secant() !)
Definition: GyotoFunctors.h:64
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
virtual double operator()(double const data[])=0
The actual function.