MGCL V10
V10
MGCL V10
|
Utility class to compute a curve parameter defined by f(t)=0. [詳解]
公開メンバ関数 | |
MGCurveParameter (const MGInterval &prange, double error=.001, double delta=5.) | |
virtual double | operator() (double t) const =0 |
return the function value f(t) to solve f(t)=0. [詳解] | |
int | getCurveParameter (double &t) |
void | set_delta (double delta) |
void | set_error (double error) |
Utility class to compute a curve parameter defined by f(t)=0.
f(t) is defined by "virtual double operator()=0;". To use MGCurveParameter class, define subclass of MGCurveParameter, and define operator(). Then use getCurveParameter member function to compute the solution of f(t)=0. Before using getCurveParameter(), the tolerance and the incremental value must be set. These default values provided in the constructor are usually not valid ones.
|
inline |
constructor. error and delta must be set if not specified in this constructor. Following default values are usually not effective.
prange | parameter range for the computation. |
error | tolerance to compute the parameter value(for f(t)). |
delta | incremental value for the curve parameter. |
int MGCurveParameter::getCurveParameter | ( | double & | t | ) |
Get the paramer value of f(t)=0 that is defined by operator()(double)=0. Function's return code is: 0: when the solution is successfully obtaine in t, 1: There is no solution. -2:system error(usually this does not occur. If occured, some bugs are included.)
t | input the guess parameter, the exact solution will be returned when function's return value is 0. |
|
pure virtual |
return the function value f(t) to solve f(t)=0.
|
inline |
|
inline |