shark::SimplexDownhill Class Reference

Simplex Downhill Method. More...

#include <shark/Algorithms/DirectSearch/SimplexDownhill.h>

+ Inheritance diagram for shark::SimplexDownhill:

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 SolutionTypesolution () const
 returns the current solution of the optimizer More...
 
- Public Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >
const Featuresfeatures () 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< SolutionTypem_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, ResultTypeObjectiveFunctionType
 
typedef TypedFlags< FeatureFeatures
 
typedef TypedFeatureNotAvailableException< FeatureFeatureNotAvailableException
 
- 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...
 

Detailed Description

Simplex Downhill Method.

The Nelder-Mead Simplex Downhill Method is a deterministic direct search method. It is known to perform quite well in low dimensions, at least for local search.
The implementation of the algorithm is along the lines of the Wikipedia article https://en.wikipedia.org/wiki/Nelder%E2%80%93Mead_method

Definition at line 59 of file SimplexDownhill.h.

Constructor & Destructor Documentation

◆ SimplexDownhill()

shark::SimplexDownhill::SimplexDownhill ( )
inline

Default Constructor.

Definition at line 63 of file SimplexDownhill.h.

Member Function Documentation

◆ init()

virtual void shark::SimplexDownhill::init ( ObjectiveFunctionType const &  objectiveFunction,
SearchPointType const &  startingPoint 
)
inlinevirtual

◆ name()

std::string shark::SimplexDownhill::name ( ) const
inlinevirtual

From INameable: return the class name.

Reimplemented from shark::INameable.

Definition at line 67 of file SimplexDownhill.h.

◆ read()

virtual void shark::SimplexDownhill::read ( InArchive archive)
inlinevirtual

Read the component from the supplied archive.

Parameters
[in,out]archiveThe 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.

◆ simplex()

std::vector<SolutionType> const& shark::SimplexDownhill::simplex ( )
inline

Read access to the current simplex.

Definition at line 177 of file SimplexDownhill.h.

References m_simplex.

◆ step()

void shark::SimplexDownhill::step ( ObjectiveFunctionType const &  objectiveFunction)
inlinevirtual

◆ write()

virtual void shark::SimplexDownhill::write ( OutArchive archive) const
inlinevirtual

Write the component to the supplied archive.

Parameters
[in,out]archiveThe 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.

Member Data Documentation

◆ m_simplex

std::vector<SolutionType> shark::SimplexDownhill::m_simplex
protected

Current simplex (algorithm state).

Definition at line 181 of file SimplexDownhill.h.

Referenced by init(), read(), simplex(), step(), and write().


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