template<class A> class NMSimplex
Need to be derived to evaluate the apropiate fuction in each step
Public Methods
-
NMSimplex()
- default constructor (dim=dimension of the problem (default=2) )
-
virtual ~NMSimplex()
- destructor
-
void SetDimensions(int dim)
- This sets the dimensions of all vectorsNS, simplex.
-
void SetAlpha(double newAlpha)
- These functions allow the user to set values of the reflection, contraction, expansion, and shrinking coefficients
-
void SetBeta(double newBeta)
-
void SetGamma(double newGamma)
-
void SetSigma(double newSigma)
-
void SetMaxCalls(long mcalls)
-
void ExploratoryMoves()
- Use Nelder Mead to find function minimum
-
void ReplaceSimplexPoint(int index, const VectorND& newPoint)
- Replaces simplex point indexed at index with newPoint
-
void CalculateFunctionValue(int index)
- Finds the f(x) value for the simplex point indexed at index and replaces the proper value in simplexValues
-
bool Stop()
- Returns true if the stopping criteria have been satisfied
-
void InitRegularTriangularSimplex(const VectorND basePoint, const double edgeLength, A &a)
- Simplex-altering functions: Initialization
-
void InitFixedLengthRightSimplex(const VectorND basePoint, const double edgeLength, A &a)
- NOTE: basePoint is assumed to be of proper dimension
-
void InitVariableLengthRightSimplex(const VectorND basePoint, const double* edgeLengths, A &a)
- NOTE: basePoint is assumed to be of proper dimension
-
void InitGeneralSimplex(const MatrixNM* plex)
- NOTE: basePoint and edgeLengths are assumed to be of proper dimension
-
int GetFunctionCalls() const
- number of objective function evaluations
-
int GetVarNo() const
- returns the dimension of the problem
-
int GetTolHit() const
- returns toleranceHit
-
void printSimplex() const
- prints out the simplex points by row, their corresponding f(x) values, and the number of function calls thus far
-
VectorND GetMinPoint() const
- simplex point which generates the best objective function value found thus far
-
double GetMinVal() const
- best objective function value found thus far
Protected Fields
-
A* x
- -----------------------------------------------------------
Protected Methods
-
virtual void fcnCall(VectorND v, double& value, int& flag)
- ------------ Modify this call of objective function for template design
Private Fields
-
int dimensions
-
MatrixNM* simplex
- the number of dimensions (the dimension of the problem)
-
double* simplexValues
- the current simplex
-
double alpha
- their corresponding f(x) values
-
double beta
- reflection coefficient
-
double gamma
- contraction coefficient
-
double sigma
- expansion coefficient
-
int minIndex
- shrinking coefficient
-
int maxIndex
- index of point generating min f(x)
-
VectorND* centroid
- index of point generating max f(x)
-
VectorND* reflectionPt
- the current centroid
-
double reflectionPtValue
- the reflection point
-
VectorND* expansionPt
- the value of f(reflectionPt)
-
double expansionPtValue
- the expansion point
-
VectorND* contractionPt
- the value of f(expansionPt)
-
double contractionPtValue
- the contraction point
-
double maxPrimePtValue
- the value of f(contractionPt)
-
long functionCalls
- min(f(maxIndexPoint),reflectionPtValue)
-
int toleranceHit
- tally of number of function calls
-
int maxPrimePtId
- 1 if stop due to tolerance, 0 if funcCalls, -1 if not stopped
-
long MaxCalls
- The maxCalls variable is not a hard limit on the number of function evaluations that may be performed by the search.
Private Methods
-
void FindMinMaxIndices()
- sets maxIndex to the simplex index of the point which generates the highest value of f(x)
-
int SecondHighestPtIndex()
- returns simplex index of the point which generates the second highest value of f(x)
-
void FindCentroid()
- finds the centroid of the simplex
-
void FindReflectionPt()
- finds the reflection point and sets its f(x) value
-
void FindExpansionPt()
- finds the expansion point and sets its f(x) value
-
void FindContractionPt()
- finds the contraction point and sets its f(x) value
-
void ShrinkSimplex()
- this function goes through the simplex and reduces the lengths of the edges adjacent to the best vertex
Documentation
Need to be derived to evaluate the apropiate fuction in each step
- NMSimplex()
- default constructor (dim=dimension of the problem (default=2) )
- virtual ~NMSimplex()
- destructor
- void SetDimensions(int dim)
- This sets the dimensions of all vectorsNS, simplex. Call always after Construction if dimensions!=2.
- void SetAlpha(double newAlpha)
- These functions allow the user to set values of the reflection, contraction, expansion, and shrinking coefficients
- void SetBeta(double newBeta)
- void SetGamma(double newGamma)
- void SetSigma(double newSigma)
- void SetMaxCalls(long mcalls)
- void ExploratoryMoves()
- Use Nelder Mead to find function minimum
- void ReplaceSimplexPoint(int index, const VectorND& newPoint)
- Replaces simplex point indexed at index with newPoint
- void CalculateFunctionValue(int index)
- Finds the f(x) value for the simplex point indexed at index and replaces the proper value in simplexValues
- bool Stop()
- Returns true if the stopping criteria have been satisfied
- void InitRegularTriangularSimplex(const VectorND basePoint, const double edgeLength, A &a)
- Simplex-altering functions: Initialization
- void InitFixedLengthRightSimplex(const VectorND basePoint, const double edgeLength, A &a)
- NOTE: basePoint is assumed to be of proper dimension
- void InitVariableLengthRightSimplex(const VectorND basePoint, const double* edgeLengths, A &a)
- NOTE: basePoint is assumed to be of proper dimension
- void InitGeneralSimplex(const MatrixNM* plex)
- NOTE: basePoint and edgeLengths are assumed to be of proper dimension
- int GetFunctionCalls() const
- number of objective function evaluations
- int GetVarNo() const
- returns the dimension of the problem
- int GetTolHit() const
- returns toleranceHit
- void printSimplex() const
- prints out the simplex points by row, their corresponding f(x) values, and the number of function calls thus far
- VectorND GetMinPoint() const
- simplex point which generates the best objective function value found thus far
- double GetMinVal() const
- best objective function value found thus far
- virtual void fcnCall(VectorND v, double& value, int& flag)
- ------------ Modify this call of objective function for template design
- A* x
- -----------------------------------------------------------
- void FindMinMaxIndices()
- sets maxIndex to the simplex index of the point which generates the highest value of f(x)
- int SecondHighestPtIndex()
- returns simplex index of the point which generates the second highest value of f(x)
- void FindCentroid()
- finds the centroid of the simplex
- void FindReflectionPt()
- finds the reflection point and sets its f(x) value
- void FindExpansionPt()
- finds the expansion point and sets its f(x) value
- void FindContractionPt()
- finds the contraction point and sets its f(x) value
- void ShrinkSimplex()
- this function goes through the simplex and reduces the lengths of the edges adjacent to the best vertex
- int dimensions
- MatrixNM* simplex
- the number of dimensions (the dimension of the problem)
- double* simplexValues
- the current simplex
- double alpha
- their corresponding f(x) values
- double beta
- reflection coefficient
- double gamma
- contraction coefficient
- double sigma
- expansion coefficient
- int minIndex
- shrinking coefficient
- int maxIndex
- index of point generating min f(x)
- VectorND* centroid
- index of point generating max f(x)
- VectorND* reflectionPt
- the current centroid
- double reflectionPtValue
- the reflection point
- VectorND* expansionPt
- the value of f(reflectionPt)
- double expansionPtValue
- the expansion point
- VectorND* contractionPt
- the value of f(expansionPt)
- double contractionPtValue
- the contraction point
- double maxPrimePtValue
- the value of f(contractionPt)
- long functionCalls
- min(f(maxIndexPoint),reflectionPtValue)
- int toleranceHit
- tally of number of function calls
- int maxPrimePtId
- 1 if stop due to tolerance, 0 if funcCalls, -1 if not stopped
- long MaxCalls
- The maxCalls variable is not a hard limit on the number of function evaluations that may be performed by the search.
The search should always halt at a point from which none of the trial steps can find improvement to be consistent with
the formal theory regarding pattern searches.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.