Simplex Downhill Method. More...
#include <shark/Algorithms/DirectSearch/SimplexDownhill.h>
Public Member Functions | |
SimplexDownhill () | |
Default Constructor. More... | |
std::string | name () const |
From INameable: return the class name. More... | |
virtual void | read (InArchive &archive) |
Read the component from the supplied archive. More... | |
virtual void | write (OutArchive &archive) const |
Write the component to the supplied archive. More... | |
virtual void | init (ObjectiveFunctionType const &objectiveFunction, SearchPointType const &startingPoint) |
Initialization of the optimizer. More... | |
void | step (ObjectiveFunctionType const &objectiveFunction) |
Step of the simplex algorithm. More... | |
std::vector< SolutionType > const & | simplex () |
Read access to the current simplex. More... | |
Public Member Functions inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
std::size_t | numInitPoints () const |
By default most single objective optimizers only require a single point. More... | |
virtual void | init (ObjectiveFunctionType const &function, std::vector< SearchPointType > const &initPoints) |
Initialize the optimizer for the supplied objective function using a set of initialisation points. More... | |
virtual const SolutionType & | solution () const |
returns the current solution of the optimizer More... | |
Public Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
const Features & | features () const |
virtual void | updateFeatures () |
bool | requiresValue () const |
bool | requiresFirstDerivative () const |
bool | requiresSecondDerivative () const |
bool | canSolveConstrained () const |
bool | requiresClosestFeasible () const |
virtual | ~AbstractOptimizer () |
virtual void | init (ObjectiveFunctionType const &function) |
Initialize the optimizer for the supplied objective function. More... | |
Public Member Functions inherited from shark::INameable | |
virtual | ~INameable () |
Public Member Functions inherited from shark::ISerializable | |
virtual | ~ISerializable () |
Virtual d'tor. More... | |
void | load (InArchive &archive, unsigned int version) |
Versioned loading of components, calls read(...). More... | |
void | save (OutArchive &archive, unsigned int version) const |
Versioned storing of components, calls write(...). More... | |
BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Protected Attributes | |
std::vector< SolutionType > | m_simplex |
Current simplex (algorithm state). More... | |
Protected Attributes inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
SolutionType | m_best |
Current solution of the optimizer. More... | |
Protected Attributes inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
Features | m_features |
Additional Inherited Members | |
Public Types inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
typedef base_type::SearchPointType | SearchPointType |
typedef base_type::SolutionType | SolutionType |
typedef base_type::ResultType | ResultType |
typedef base_type::ObjectiveFunctionType | ObjectiveFunctionType |
Public Types inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
enum | Feature |
Models features that the optimizer requires from the objective function. More... | |
typedef RealVector | SearchPointType |
typedef double | ResultType |
typedef SingleObjectiveResultSet< RealVector > | SolutionType |
typedef AbstractObjectiveFunction< RealVector, ResultType > | ObjectiveFunctionType |
typedef TypedFlags< Feature > | Features |
typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
Protected Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
void | checkFeatures (ObjectiveFunctionType const &objectiveFunction) |
Convenience function that checks whether the features of the supplied objective function match with the required features of the optimizer. More... | |
Simplex Downhill Method.
Definition at line 59 of file SimplexDownhill.h.
|
inline |
Default Constructor.
Definition at line 63 of file SimplexDownhill.h.
|
inlinevirtual |
Initialization of the optimizer.
The initial simplex is created is a distance of about one around the proposed starting point.
Implements shark::AbstractSingleObjectiveOptimizer< RealVector >.
Definition at line 89 of file SimplexDownhill.h.
References shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >::checkFeatures(), shark::AbstractObjectiveFunction< PointType, ResultT >::eval(), shark::AbstractSingleObjectiveOptimizer< RealVector >::m_best, m_simplex, and shark::ResultSet< SearchPointT, ResultT >::value.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 67 of file SimplexDownhill.h.
|
inlinevirtual |
Read the component from the supplied archive.
[in,out] | archive | The archive to read from. |
Reimplemented from shark::ISerializable.
Definition at line 71 of file SimplexDownhill.h.
References shark::AbstractSingleObjectiveOptimizer< RealVector >::m_best, m_simplex, shark::ResultSet< SearchPointT, ResultT >::point, and shark::ResultSet< SearchPointT, ResultT >::value.
|
inline |
Read access to the current simplex.
Definition at line 177 of file SimplexDownhill.h.
References m_simplex.
|
inlinevirtual |
Step of the simplex algorithm.
Implements shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >.
Definition at line 109 of file SimplexDownhill.h.
References shark::AbstractSingleObjectiveOptimizer< RealVector >::m_best, m_simplex, and shark::ResultSet< SearchPointT, ResultT >::value.
|
inlinevirtual |
Write the component to the supplied archive.
[in,out] | archive | The archive to write to. |
Reimplemented from shark::ISerializable.
Definition at line 78 of file SimplexDownhill.h.
References shark::AbstractSingleObjectiveOptimizer< RealVector >::m_best, m_simplex, shark::ResultSet< SearchPointT, ResultT >::point, and shark::ResultSet< SearchPointT, ResultT >::value.
|
protected |