net.sourceforge.cilib.pso.crossover.pbestupdate.CurrentPositionOffspringPBestProvider Maven / Gradle / Ivy
/** __ __
* _____ _/ /_/ /_ 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;
/**
* This OffspringPBestProvider sets an offspring's pBest to its current position.
*/
public class CurrentPositionOffspringPBestProvider extends OffspringPBestProvider {
@Override
public StructuredType f(List parent, Particle offspring) {
return offspring.getPosition();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy