All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.cilib.util.Entities Maven / Gradle / Ivy

Go to download

A library of composable components enabling simpler Computational Intelligence

There is a newer version: 0.8
Show newest version
/**           __  __
 *    _____ _/ /_/ /_    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 entities) {
        List solutions = new ArrayList();
        
        for (Entity e : entities) {
            solutions.add((T) e.getCandidateSolution());
        }
        
        return solutions;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy