34 #ifndef SHARK_OBJECTIVEFUNCTIONS_EVALUATIONARCHIVE_H 35 #define SHARK_OBJECTIVEFUNCTIONS_EVALUATIONARCHIVE_H 67 template <
typename Po
intType,
typename ResultT>
97 return (toString() == other.toString());
101 return (toString() < other.toString());
108 std::string toString()
const 110 std::stringstream ss;
111 ss << point <<
" " <<
result;
127 : mep_objective(objective)
136 {
return mep_objective; }
140 {
return mep_objective; }
144 mep_objective->setRng(this->
mep_rng);
145 mep_objective->init();
150 {
return mep_objective->numberOfObjectives(); }
154 {
return mep_objective->hasScalableObjectives(); }
158 { mep_objective->setNumberOfObjectives(numberOfObjectives); }
162 {
return mep_objective->isFeasible(input); }
166 {
return mep_objective->closestFeasible(input); }
170 {
return mep_objective->proposeStartingPoint(startingPoint); }
175 return mep_objective->numberOfVariables();
179 ResultType
eval(
const SearchPointType& input)
const 181 ResultType r = mep_objective->eval(input);
191 {
return eval(input); }
194 ResultType
evalDerivative(
const SearchPointType& input, FirstOrderDerivative& derivative)
const 196 ResultType r = mep_objective->evalDerivative(input, derivative);
203 ResultType
evalDerivative(
const SearchPointType& input, SecondOrderDerivative& derivative)
const 205 ResultType r = mep_objective->evalDerivative(input, derivative);
218 {
return m_archive.size(); }
222 {
return m_archive.begin(); }
225 PointResultPairConstIterator
begin()
const 226 {
return m_archive.begin(); }
229 PointResultPairIterator
end()
230 {
return m_archive.end(); }
233 PointResultPairConstIterator
end()
const 234 {
return m_archive.end(); }
237 base_type* mep_objective;
238 mutable PointResultPairContainer m_archive;