Exemplo n.º 1
0
void PerPointUpdater<TFunction>::update(Population* population) {
  for (Population::Iterator it = population->begin();
       it != population->end();
       ++it) {
     Point updated_point;
     (one_point_updaters_info_->getInfoById(it.point_id()))->update(it.point(),
                                                         &updated_point);
     population->updatePoint(it.point_id(), updated_point);
  }
}
Exemplo n.º 2
0
void PerPointStopCriterion<TFunction>::update(const Population& population) {
  for (Population::Iterator it = population.begin();
       it != population.end();
       ++it) {
    typename OnePointStopCriterion<TFunction>::Ptr one_point_stop_criterion =
      stop_criterion_info_->getInfoById(it.point_id());
    one_point_stop_criterion->update(it.point());
  }
}
Exemplo n.º 3
0
PopulationInfo<TInfo>::PopulationInfo(Population* population,
                                      typename TInfo::Ptr sample_info)
    : BasePopulationInfo(population),
      sample_info_(sample_info) {
  for (Population::Iterator individual = population->begin();
       individual != population->end();
       ++individual) {
    typename TInfo::Ptr info = sample_info_->clone();
    info->init(individual.point(),
               sample_info_->function(),
               sample_info_->set());
    infomap_[individual.point_id()] = info;
  }
}