Drop "using" statement from header.
[PaGMO.git] / AstroToolbox / ZeroFinder.h
blobed20505713c541b8e14248fbcc9ba73a7cac42fa
1 // ------------------------------------------------------------------------ //
2 // This source file is part of the 'ESA Advanced Concepts Team's //
3 // Space Mechanics Toolbox' software. //
4 // //
5 // The source files are for research use only, //
6 // and are distributed WITHOUT ANY WARRANTY. Use them on your own risk. //
7 // //
8 // Copyright (c) 2004-2007 European Space Agency //
9 // ------------------------------------------------------------------------ //
11 #ifndef ZEROFINDER_H
12 #define ZEROFINDER_H
14 /// Namespace
15 namespace ZeroFinder
18 /// Class for one dimensional functions
19 // with some parameters
20 /** The ()-operator with one double argument
21 * has to be overloaded for a derived class
22 * The return value is the ordinate computed for
23 * the abscissa-argument.
25 class Function1D
27 public:
28 //virtual double Compute(double x)=0;
29 virtual double operator()(double x)=0;
30 // parameters
31 double p1,p2;
32 void SetParameters(double a, double b);
33 virtual ~Function1D() {}
36 class Function1D_7param
38 public:
39 //virtual double Compute(double x)=0;
40 virtual double operator()(double x)=0;
41 // parameters
42 double p1,p2,p3,p4,p5,p6,p7;
43 void SetParameters(double a, double b, double c, double d, double e, double f, double g);
44 virtual ~Function1D_7param() {}
48 class FZero
50 private:
51 double a, c; // lower and upper bound
53 public:
54 FZero(double a, double b); // constructor
55 // fzero procedure
56 double FindZero(Function1D& f);
57 double FindZero7(Function1D_7param& f);
58 void SetBounds(double a, double b);
63 #endif