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. More... | |
| base_type * | objective () |
| Access to the underlying objective function. More... | |
| const base_type * | objective () const |
| Access to the underlying objective function. More... | |
| void | init () |
| Wrapper function. More... | |
| virtual std::size_t | numberOfObjectives () const |
| Wrapper function. More... | |
| bool | hasScalableObjectives () const |
| Wrapper function. More... | |
| void | setNumberOfObjectives (std::size_t numberOfObjectives) |
| Wrapper function. More... | |
| bool | isFeasible (const SearchPointType &input) const |
| Wrapper function. More... | |
| void | closestFeasible (SearchPointType &input) const |
| Wrapper function. More... | |
| void | proposeStartingPoint (SearchPointType &startingPoint) const |
| Wrapper function. More... | |
| std::size_t | numberOfVariables () const |
| Wrapper function; conditional on vector space property. More... | |
| ResultType | eval (const SearchPointType &input) const |
| Wrapper function storing point and result. More... | |
| ResultType | operator() (const SearchPointType &input) const |
| ResultType | evalDerivative (const SearchPointType &input, FirstOrderDerivative &derivative) const |
| Wrapper function storing point and result. More... | |
| ResultType | evalDerivative (const SearchPointType &input, SecondOrderDerivative &derivative) const |
| Wrapper function storing point and result. More... | |
| std::size_t | size () const |
| Return the size of the archive; which is the number of point/result pairs. More... | |
| PointResultPairIterator | begin () |
| Begin iterator to the point/result pairs. More... | |
| PointResultPairConstIterator | begin () const |
| Begin iterator to the point/result pairs. More... | |
| PointResultPairIterator | end () |
| End iterator to the point/result pairs. More... | |
| PointResultPairConstIterator | end () const |
| End iterator to the point/result pairs. More... | |
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 More... | |
| bool | hasFirstDerivative () const |
| returns whether this function can calculate the first derivative More... | |
| bool | hasSecondDerivative () const |
| returns whether this function can calculate the second derivative More... | |
| bool | canProposeStartingPoint () const |
| returns whether this function can propose a starting point. More... | |
| bool | isConstrained () const |
| returns whether this function can return More... | |
| bool | hasConstraintHandler () const |
| returns whether this function can return More... | |
| bool | canProvideClosestFeasible () const |
| Returns whether this function can calculate thee closest feasible to an infeasible point. More... | |
| bool | isThreadSafe () const |
| Returns true, when the function can be usd in parallel threads. More... | |
| AbstractObjectiveFunction () | |
| Default ctor. More... | |
| virtual | ~AbstractObjectiveFunction () |
| Virtual destructor. More... | |
| virtual bool | hasScalableDimensionality () const |
| virtual void | setNumberOfVariables (std::size_t numberOfVariables) |
| Adjusts the number of variables if the function is scalable. More... | |
| std::size_t | evaluationCounter () const |
| Accesses the evaluation counter of the function. More... | |
| AbstractConstraintHandler< SearchPointType > const & | getConstraintHandler () const |
| Returns the constraint handler of the function if it has one. More... | |
| virtual SearchPointType | proposeStartingPoint () const |
| Proposes a starting point in the feasible search space of the function. More... | |
| ResultType | operator() (const SearchPointType &input) const |
| Evaluates the function. Useful together with STL-Algorithms like std::transform. More... | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
| virtual std::string | name () const |
| returns the name of the object More... | |
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. More... | |
Protected Attributes inherited from shark::AbstractObjectiveFunction< PointType, ResultT > | |
| Features | m_features |
| std::size_t | m_evaluationCounter |
| Evaluation counter, default value: 0. More... | |
| AbstractConstraintHandler< SearchPointType > const * | m_constraintHandler |
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 >::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 163 of file EvaluationArchive.h.
|
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 >::m_evaluationCounter, and shark::EvaluationArchive< PointType, ResultT >::PointResultPairType::PointResultPairType().
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 >::m_evaluationCounter, and shark::EvaluationArchive< PointType, ResultT >::PointResultPairType::PointResultPairType().
|
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 >::m_evaluationCounter, and shark::EvaluationArchive< PointType, ResultT >::PointResultPairType::PointResultPairType().
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 151 of file EvaluationArchive.h.
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 143 of file EvaluationArchive.h.
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 159 of file EvaluationArchive.h.
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 147 of file EvaluationArchive.h.
|
inlinevirtual |
Wrapper function; conditional on vector space property.
Implements shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 171 of file EvaluationArchive.h.
References shark::AbstractObjectiveFunction< PointType, ResultT >::numberOfVariables(), and SHARKEXCEPTION.
|
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 167 of file EvaluationArchive.h.
|
inlinevirtual |
Wrapper function.
Reimplemented from shark::AbstractObjectiveFunction< PointType, ResultT >.
Definition at line 155 of file EvaluationArchive.h.
|
inline |
Return the size of the archive; which is the number of point/result pairs.
Definition at line 217 of file EvaluationArchive.h.