1 #ifndef MATH_Equation_H
2 #define MATH_Equation_H
136 mMaxIterationsNumber=v;
196 SPC::MATH_Function p=mFunction.lock();
202 SP::MATH_Function p=mFunction.lock();
226 return (mIterationsNumber<mMaxIterationsNumber+1);
void setMaxError(const tReal &err)
set the wished max error
Definition: MATH_Equation.h:160
WP::MATH_Function mFunction
Definition: MATH_Equation.h:63
virtual void saveToUIClass(UI_Class &mclass) const
how to save the object from a mate model class
Definition: MATH_Equation.cpp:33
This class describes a function function.
Definition: MATH_Function.h:16
tReal mError
Definition: MATH_Equation.h:54
virtual tBoolean hasSucceeded() const
return true if the method has succeeded
Definition: MATH_Equation.h:225
DEFINE_SVPTR(MATH_Equation)
MATH_Function * getFunction()
get the function
Definition: MATH_Equation.h:201
This class is the base class of User Interface package.
Definition: UI_Object.h:23
This class describes the main interface class for a soft user interface (R,matlab,python etc...) class.
Definition: UI_Class.h:38
virtual ~MATH_Equation(void)
destroy an Equation Object.
Definition: MATH_Equation.cpp:19
tReal getSolution() const
get the solution
Definition: MATH_Equation.h:145
#define tBoolean
Definition: types.h:48
static const tReal EPSILON
Definition: MATH_Equation.h:27
virtual void copy(const MATH_Equation *m)
copy the parameters of the optimization method
Definition: MATH_Equation.cpp:44
#define null
Definition: types.h:13
void getInterval(tReal &a, tReal &b) const
get interval of searching
Definition: MATH_Equation.h:128
int getIterationsNumber() const
get the iterations number to reach the solution
Definition: MATH_Equation.h:150
DEFINE_SPTR(MATH_Equation)
virtual tString toString() const
to string
Definition: MATH_Equation.cpp:54
void setFunction(SP::MATH_Function f)
set function
Definition: MATH_Equation.h:190
virtual tReal solve()=0
solve the equation
tReal getError() const
get the error estimated with the solution
Definition: MATH_Equation.h:155
int mIterationsNumber
Definition: MATH_Equation.h:52
const MATH_Function * getFunction() const
get the function
Definition: MATH_Equation.h:195
This class solve the equation f(x)=0.
Definition: MATH_Equation.h:21
tReal mX
Definition: MATH_Equation.h:53
void setSolution(const tReal &x)
set the solution
Definition: MATH_Equation.h:172
void setError(const tReal &err)
set the error estimated with the solution
Definition: MATH_Equation.h:182
int mMaxIterationsNumber
Definition: MATH_Equation.h:50
#define tString
Definition: types.h:49
void setIterationsNumber(const int &n)
set the iterations number to reach the solution
Definition: MATH_Equation.h:177
tReal mInterval[2]
Definition: MATH_Equation.h:56
virtual void setInterval(const tReal &a, const tReal &b)
set the interval of searching
Definition: MATH_Equation.h:122
tReal mMaxError
Definition: MATH_Equation.h:49
virtual tBoolean hasFunction() const
return true if the optimized method has function
Definition: MATH_Equation.h:208
#define tReal
Definition: types.h:18
void setMaxIterationsNumber(const int &v)
set max iterations number
Definition: MATH_Equation.h:135
MATH_Equation(void)
create a Equation object
Definition: MATH_Equation.cpp:7
tReal getMaxError() const
get the wished max error
Definition: MATH_Equation.h:165
virtual void loadFromUIClass(const UI_Class &mclass)
how to load the object from a Meta Model class
Definition: MATH_Equation.cpp:23
int getMaxIterationsNumber() const
get the max iteration number
Definition: MATH_Equation.h:140