OpenCV453
クラス | 公開メンバ関数 | 全メンバ一覧
cv::MinProblemSolver クラスabstract

Basic interface for all solvers [詳解]

#include <optim.hpp>

cv::Algorithmを継承しています。

cv::ConjGradSolver, cv::DownhillSolverに継承されています。

クラス

class  Function
 Represents function being optimized [詳解]
 

公開メンバ関数

virtual Ptr< FunctiongetFunction () const =0
 Getter for the optimized function. [詳解]
 
virtual void setFunction (const Ptr< Function > &f)=0
 Setter for the optimized function. [詳解]
 
virtual TermCriteria getTermCriteria () const =0
 Getter for the previously set terminal criteria for this algorithm. [詳解]
 
virtual void setTermCriteria (const TermCriteria &termcrit)=0
 Set terminal criteria for solver. [詳解]
 
virtual double minimize (InputOutputArray x)=0
 actually runs the algorithm and performs the minimization. [詳解]
 
- 基底クラス cv::Algorithm に属する継承公開メンバ関数
virtual CV_WRAP void clear ()
 Clears the algorithm state [詳解]
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage [詳解]
 
CV_WRAP void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindings これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。
 
virtual CV_WRAP void read (const FileNode &fn)
 Reads algorithm parameters from a file storage [詳解]
 
virtual CV_WRAP bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read [詳解]
 
virtual CV_WRAP void save (const String &filename) const
 
virtual CV_WRAP String getDefaultName () const
 

その他の継承メンバ

- 基底クラス cv::Algorithm に属する継承静的公開メンバ関数
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node [詳解]
 
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file [詳解]
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String [詳解]
 
- 基底クラス cv::Algorithm に属する継承限定公開メンバ関数
void writeFormat (FileStorage &fs) const
 

詳解

Basic interface for all solvers

関数詳解

◆ getFunction()

virtual Ptr< Function > cv::MinProblemSolver::getFunction ( ) const
pure virtual

Getter for the optimized function.

The optimized function is represented by Function interface, which requires derivatives to implement the calc(double*) and getDim() methods to evaluate the function.

戻り値
Smart-pointer to an object that implements Function interface - it represents the function that is being optimized. It can be empty, if no function was given so far.

◆ getTermCriteria()

virtual TermCriteria cv::MinProblemSolver::getTermCriteria ( ) const
pure virtual

Getter for the previously set terminal criteria for this algorithm.

戻り値
Deep copy of the terminal criteria used at the moment.

◆ minimize()

virtual double cv::MinProblemSolver::minimize ( InputOutputArray  x)
pure virtual

actually runs the algorithm and performs the minimization.

The sole input parameter determines the centroid of the starting simplex (roughly, it tells where to start), all the others (terminal criteria, initial step, function to be minimized) are supposed to be set via the setters before the call to this method or the default values (not always sensible) will be used.

引数
xThe initial point, that will become a centroid of an initial simplex. After the algorithm will terminate, it will be set to the point where the algorithm stops, the point of possible minimum.
戻り値
The value of a function at the point found.

◆ setFunction()

virtual void cv::MinProblemSolver::setFunction ( const Ptr< Function > &  f)
pure virtual

Setter for the optimized function.

It should be called at least once before the call to* minimize(), as default value is not usable.

引数
fThe new function to optimize.

◆ setTermCriteria()

virtual void cv::MinProblemSolver::setTermCriteria ( const TermCriteria termcrit)
pure virtual

Set terminal criteria for solver.

This method is not necessary to be called before the first call to minimize(), as the default value is sensible.

Algorithm stops when the number of function evaluations done exceeds termcrit.maxCount, when the function values at the vertices of simplex are within termcrit.epsilon range or simplex becomes so small that it can enclosed in a box with termcrit.epsilon sides, whatever comes first.

引数
termcritTerminal criteria to be used, represented as cv::TermCriteria structure.

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