net.sourceforge.cilib.entity
Class Topologies

java.lang.Object
  extended by net.sourceforge.cilib.entity.Topologies

public final class Topologies
extends Object

Topology related utilities.

Author:
gpampara

Method Summary
static
<T extends Entity>
Set<T>
getNeighbourhoodBestEntities(Topology<T> topology)
          Obtain the best entity from each neighbourhood and return them.
static
<T extends Entity>
Set<T>
getNeighbourhoodBestEntities(Topology<T> topology, Comparator<T> comparator)
          Gather the best entity of each neighbourhood (in this Topology) in a Set (duplicates are not allowed) and return them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNeighbourhoodBestEntities

public static <T extends Entity> Set<T> getNeighbourhoodBestEntities(Topology<T> topology)
Obtain the best entity from each neighbourhood and return them.

Type Parameters:
T - The Entity type.
Parameters:
topology - The topology to query.
Returns:
a Set of neighbourhood best entities.

getNeighbourhoodBestEntities

public static <T extends Entity> Set<T> getNeighbourhoodBestEntities(Topology<T> topology,
                                                                     Comparator<T> comparator)
Gather the best entity of each neighbourhood (in this Topology) in a Set (duplicates are not allowed) and return them. A single Entity may dominate in more than one neighbourhood, but we just want unique entities.

Type Parameters:
T - The entity type.
Parameters:
topology - The topology to query.
comparator - The comparator to use.
Returns:
a Set cosisting of the best entity of each neighbourhood in the topology


Copyright © 2009 CIRG. All Rights Reserved.