net.sourceforge.cilib.util.Entities 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
/** __ __
* _____ _/ /_/ /_ Computational Intelligence Library (CIlib)
* / ___/ / / / __ \ (c) CIRG @ UP
* / /__/ / / / /_/ / http://cilib.net
* \___/_/_/_/_.___/
*/
package net.sourceforge.cilib.util;
import java.util.ArrayList;
import java.util.List;
import net.sourceforge.cilib.entity.Entity;
import net.sourceforge.cilib.type.types.container.StructuredType;
/**
* Utility methods for Entities.
*/
public class Entities {
/**
* Gets the candidate solutions from a list of entities.
* @param entities The list of entities.
* @return The list of candidate solutions.
*/
public static List getCandidateSolutions(List extends Entity> entities) {
List solutions = new ArrayList();
for (Entity e : entities) {
solutions.add((T) e.getCandidateSolution());
}
return solutions;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy