net.sourceforge.cilib.pso.crossover.pbestupdate.BestParentOffspringPBestProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cilib-library Show documentation
Show all versions of cilib-library Show documentation
A library of composable components enabling simpler Computational Intelligence
The newest version!
/** __ __
* _____ _/ /_/ /_ Computational Intelligence Library (CIlib)
* / ___/ / / / __ \ (c) CIRG @ UP
* / /__/ / / / /_/ / http://cilib.net
* \___/_/_/_/_.___/
*/
package net.sourceforge.cilib.pso.crossover.pbestupdate;
import java.util.List;
import net.sourceforge.cilib.pso.particle.Particle;
import net.sourceforge.cilib.type.types.container.StructuredType;
import net.sourceforge.cilib.util.selection.recipes.ElitistSelector;
/**
* This OffspringPBestProvider sets an offspring's pBest to the best parent's pBest.
*/
public class BestParentOffspringPBestProvider extends OffspringPBestProvider {
@Override
public StructuredType f(List parents, Particle offspring) {
return new ElitistSelector().on(parents).select().getBestPosition();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy