SigUtil  0.95
Utility modules for modern C++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sig::ManageConvergenceSimple Class Reference

収束判定の管理を行うクラス More...

Public Member Functions

 ManageConvergenceSimple (double epsilon)
 コンストラクタ More...
 
bool update (double value)
 状態の更新と収束判定 More...
 
double get_value () const
 前回の値の取得 More...
 
bool is_convergence () const
 

Detailed Description

収束判定の管理を行うクラス

反復処理において、前回の値との差が指定値未満になると収束と判定する

const double eps = 0.01;
double value = 100;
while (!conv.update(value /= 2)) ;

Definition at line 64 of file convergence.hpp.

Constructor & Destructor Documentation

sig::ManageConvergenceSimple::ManageConvergenceSimple ( double  epsilon)
inline

コンストラクタ

Parameters
epsilon収束判定用の定数(前回の値との差がこの定数未満であれば収束と判定する)

Definition at line 75 of file convergence.hpp.

Member Function Documentation

double sig::ManageConvergenceSimple::get_value ( ) const
inline

前回の値の取得

Definition at line 91 of file convergence.hpp.

bool sig::ManageConvergenceSimple::is_convergence ( ) const
inline

Definition at line 93 of file convergence.hpp.

bool sig::ManageConvergenceSimple::update ( double  value)
inline

状態の更新と収束判定

Parameters
value収束判定に用いる値(ex:評価関数の出力)
Returns
true(収束), false(未収束)

Definition at line 83 of file convergence.hpp.


The documentation for this class was generated from the following file: