107 archive >> BOOST_SERIALIZATION_NVP(
m_parents);
108 archive >> BOOST_SERIALIZATION_NVP(m_mu);
109 archive >> BOOST_SERIALIZATION_NVP(
m_best);
111 archive >> BOOST_SERIALIZATION_NVP(m_selection);
112 archive >> BOOST_SERIALIZATION_NVP(m_notionOfSuccess);
113 archive >> BOOST_SERIALIZATION_NVP(m_individualSuccessThreshold);
114 archive >> BOOST_SERIALIZATION_NVP(m_initialSigma);
117 archive << BOOST_SERIALIZATION_NVP(
m_parents);
118 archive << BOOST_SERIALIZATION_NVP(m_mu);
119 archive << BOOST_SERIALIZATION_NVP(
m_best);
121 archive << BOOST_SERIALIZATION_NVP(m_selection);
122 archive << BOOST_SERIALIZATION_NVP(m_notionOfSuccess);
123 archive << BOOST_SERIALIZATION_NVP(m_individualSuccessThreshold);
124 archive << BOOST_SERIALIZATION_NVP(m_initialSigma);
136 std::vector<SearchPointType>
const& initialSearchPoints
139 std::vector<RealVector> values(initialSearchPoints.size());
140 for(std::size_t i = 0; i != initialSearchPoints.size(); ++i){
142 values[i] = function.
eval(initialSearchPoints[i]);
163 std::vector<SearchPointType>
const& initialSearchPoints,
164 std::vector<ResultType>
const& functionValues,
175 std::size_t noVariables = initialSearchPoints[0].size();
178 std::size_t numPoints = 0;
179 if(initialSearchPoints.size()<=
mu){
180 numPoints = initialSearchPoints.size();
181 for(std::size_t i = 0; i != numPoints; ++i){
183 m_parents[i].searchPoint() = initialSearchPoints[i];
184 m_parents[i].penalizedFitness() = functionValues[i];
185 m_parents[i].unpenalizedFitness() = functionValues[i];
189 for(std::size_t i = numPoints; i !=
mu; ++i){
190 std::size_t index =
random::discrete(*mpe_rng, std::size_t(0),initialSearchPoints.size()-1);
192 m_parents[i].searchPoint() = initialSearchPoints[index];
193 m_parents[i].penalizedFitness() = functionValues[index];
194 m_parents[i].unpenalizedFitness() = functionValues[index];
197 for(std::size_t i = 0; i !=
mu; ++i){
201 indicator().init(functionValues.front().size(),
mu,*mpe_rng);
203 sortRankOneToFront();
208 std::size_t maxIdx = 0;
209 for (; maxIdx <
m_parents.size(); maxIdx++) {
214 std::size_t parentId =
random::discrete(*mpe_rng, std::size_t(0), maxIdx-1);
215 std::vector<IndividualType> offspring;
216 offspring.push_back(
m_parents[parentId]);
217 offspring[0].mutate(*mpe_rng);
218 offspring[0].parent() = parentId;