MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
MGCurveParameter クラスabstract

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.

構築子と解体子

MGCurveParameter::MGCurveParameter ( const MGInterval prange,
double  error = .001,
double  delta = 5. 
)
inline

constructor. error and delta must be set if not specified in this constructor. Following default values are usually not effective.

引数
prangeparameter range for the computation.
errortolerance to compute the parameter value(for f(t)).
deltaincremental 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.)

引数
tinput the guess parameter, the exact solution will be returned when function's return value is 0.
virtual double MGCurveParameter::operator() ( double  t) const
pure virtual

return the function value f(t) to solve f(t)=0.

void MGCurveParameter::set_delta ( double  delta)
inline
void MGCurveParameter::set_error ( double  error)
inline

このクラス詳解は次のファイルから抽出されました: