Objective function wrapper storing all function evaluations. More...
#include <shark/ObjectiveFunctions/EvaluationArchive.h>
Inheritance diagram for shark::EvaluationArchive< PointType, ResultT >:Classes | |
| class | PointResultPairType |
| Pair of point and result. More... | |
Public Member Functions | |
| EvaluationArchive (base_type *objective) | |
| Constructor. | |
| base_type * | objective () |
| Access to the underlying objective function. | |
| const base_type * | objective () const |
| Access to the underlying objective function. | |
| void | init () |
| Wrapper function. | |
| virtual std::size_t | numberOfObjectives () const |
| Wrapper function. | |
| bool | hasScalableObjectives () const |
| Wrapper function. | |
| void | setNumberOfObjectives (std::size_t numberOfObjectives) |
| Wrapper function. | |
| bool | isFeasible (const SearchPointType &input) const |
| Wrapper function. | |
| void | closestFeasible (SearchPointType &input) const |
| Wrapper function. | |
| void | proposeStartingPoint (SearchPointType &startingPoint) const |
| Wrapper function. | |
| std::size_t | numberOfVariables () const |
| Wrapper function; conditional on vector space property. | |
| ResultType | eval (const SearchPointType &input) const |
| Wrapper function storing point and result. | |
| ResultType | operator() (const SearchPointType &input) const |
| ResultType | evalDerivative (const SearchPointType &input, FirstOrderDerivative &derivative) const |
| Wrapper function storing point and result. | |
| ResultType | evalDerivative (const SearchPointType &input, SecondOrderDerivative &derivative) const |
| Wrapper function storing point and result. | |
| std::size_t | size () const |
| Return the size of the archive; which is the number of point/result pairs. | |
| PointResultPairIterator | begin () |
| Begin iterator to the point/result pairs. | |
| PointResultPairConstIterator | begin () const |
| Begin iterator to the point/result pairs. | |
| PointResultPairIterator | end () |
| End iterator to the point/result pairs. | |
| PointResultPairConstIterator | end () const |
| End iterator to the point/result pairs. | |
Public Member Functions inherited from shark::AbstractObjectiveFunction< PointType, ResultT > | |
| const Features & | features () const |
| virtual void | updateFeatures () |
| bool | hasValue () const |
| returns whether this function can calculate it's function value | |
| bool | hasFirstDerivative () const |
| returns whether this function can calculate the first derivative | |
| bool | hasSecondDerivative () const |
| returns whether this function can calculate the second derivative | |
| bool | canProposeStartingPoint () const |
| returns whether this function can propose a starting point. | |
| bool | isConstrained () const |
| returns whether this function can return | |
| bool | hasConstraintHandler () const |
| returns whether this function can return | |
| bool | canProvideClosestFeasible () const |
| Returns whether this function can calculate thee closest feasible to an infeasible point. | |
| bool | isThreadSafe () const |
| Returns true, when the function can be usd in parallel threads. | |
| bool | isNoisy () const |
| Returns true, when the function can be usd in parallel threads. | |
| AbstractObjectiveFunction () | |
| Default ctor. | |
| virtual | ~AbstractObjectiveFunction () |
| Virtual destructor. | |
| void | setRng (random::rng_type *rng) |
| Sets the Rng used by the objective function. | |
| virtual bool | hasScalableDimensionality () const |
| virtual void | setNumberOfVariables (std::size_t numberOfVariables) |
| Adjusts the number of variables if the function is scalable. | |
| std::size_t | evaluationCounter () const |
| Accesses the evaluation counter of the function. | |
| AbstractConstraintHandler< SearchPointType > const & | getConstraintHandler () const |
| Returns the constraint handler of the function if it has one. | |
| virtual SearchPointType | proposeStartingPoint () const |
| Proposes a starting point in the feasible search space of the function. | |
| ResultType | operator() (SearchPointType const &input) const |
| Evaluates the function. Useful together with STL-Algorithms like std::transform. | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
| virtual std::string | name () const |
| returns the name of the object | |
Additional Inherited Members | |
Protected Member Functions inherited from shark::AbstractObjectiveFunction< PointType, ResultT > | |
| void | announceConstraintHandler (AbstractConstraintHandler< SearchPointType > const *handler) |
| helper function which is called to announce the presence of an constraint handler. | |
Protected Attributes inherited from shark::AbstractObjectiveFunction< PointType, ResultT > | |
| Features | m_features |
| std::size_t | m_evaluationCounter |
| Evaluation counter, default value: 0. | |
| AbstractConstraintHandler< SearchPointType > const * | m_constraintHandler |
| random::rng_type * | mep_rng |
Objective function wrapper storing all function evaluations.
| PointType | The search space the function is defined upon. |
| ResultT | The objective space the function is defined upon. |
Definition at line 68 of file EvaluationArchive.h.
| typedef base_type::FirstOrderDerivative shark::EvaluationArchive< PointType, ResultT >::FirstOrderDerivative |
Definition at line 75 of file EvaluationArchive.h.
| typedef PointResultPairContainer::const_iterator shark::EvaluationArchive< PointType, ResultT >::PointResultPairConstIterator |
Definition at line 118 of file EvaluationArchive.h.
| typedef std::set<PointResultPairType> shark::EvaluationArchive< PointType, ResultT >::PointResultPairContainer |
Definition at line 116 of file EvaluationArchive.h.
| typedef PointResultPairContainer::iterator shark::EvaluationArchive< PointType, ResultT >::PointResultPairIterator |
Definition at line 117 of file EvaluationArchive.h.
| typedef base_type::ResultType shark::EvaluationArchive< PointType, ResultT >::ResultType |
Definition at line 73 of file EvaluationArchive.h.
| typedef base_type::SearchPointType shark::EvaluationArchive< PointType, ResultT >::SearchPointType |
Definition at line 72 of file EvaluationArchive.h.
| typedef base_type::SecondOrderDerivative shark::EvaluationArchive< PointType, ResultT >::SecondOrderDerivative |
Definition at line 76 of file EvaluationArchive.h.
|
inline |
Constructor.
Definition at line 126 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::features(), shark::AbstractObjectiveFunction< PointType, ResultT >::getConstraintHandler(), shark::AbstractObjectiveFunction< PointType, ResultT >::hasConstraintHandler(), shark::AbstractObjectiveFunction< PointType, ResultT >::m_constraintHandler, and shark::AbstractObjectiveFunction< PointType, ResultT >::m_features.
|
inline |
Begin iterator to the point/result pairs.
Definition at line 221 of file EvaluationArchive.h.
|
inline |
Begin iterator to the point/result pairs.
Definition at line 225 of file EvaluationArchive.h.
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 165 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::closestFeasible().
|
inline |
End iterator to the point/result pairs.
Definition at line 229 of file EvaluationArchive.h.
|
inline |
End iterator to the point/result pairs.
Definition at line 233 of file EvaluationArchive.h.
|
inlinevirtual |
Wrapper function storing point and result.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 179 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::eval(), and shark::AbstractObjectiveFunction< PointType, ResultT >::m_evaluationCounter.
Referenced by shark::EvaluationArchive< PointType, ResultT >::operator()().
|
inlinevirtual |
Wrapper function storing point and result.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 194 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::evalDerivative(), and shark::AbstractObjectiveFunction< PointType, ResultT >::m_evaluationCounter.
|
inlinevirtual |
Wrapper function storing point and result.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 203 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::evalDerivative(), and shark::AbstractObjectiveFunction< PointType, ResultT >::m_evaluationCounter.
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 153 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::hasScalableObjectives().
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 143 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::init(), shark::AbstractObjectiveFunction< PointType, ResultT >::mep_rng, and shark::AbstractObjectiveFunction< PointType, ResultT >::setRng().
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 161 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::isFeasible().
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 149 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::numberOfObjectives().
Referenced by shark::EvaluationArchive< PointType, ResultT >::setNumberOfObjectives().
|
inlinevirtual |
Wrapper function; conditional on vector space property.
Implements shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 173 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::numberOfVariables().
|
inline |
Access to the underlying objective function.
Definition at line 135 of file EvaluationArchive.h.
|
inline |
Access to the underlying objective function.
Definition at line 139 of file EvaluationArchive.h.
|
inline |
Definition at line 190 of file EvaluationArchive.h.
References shark::EvaluationArchive< PointType, ResultT >::eval().
|
inline |
Wrapper function.
Definition at line 169 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::proposeStartingPoint().
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 157 of file EvaluationArchive.h.
References shark::EvaluationArchive< PointType, ResultT >::numberOfObjectives(), and shark::AbstractObjectiveFunction< PointType, ResultT >::setNumberOfObjectives().
|
inline |
Return the size of the archive; which is the number of point/result pairs.
Definition at line 217 of file EvaluationArchive.h.