|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.entity.AbstractTopology<E>
E
- The Entity
type.public abstract class AbstractTopology<E extends Entity>
This an abstract class which extends from the abstract Topology class. All PopulationBasedAlgorithm Topologies must inherit from this class.
Constructor Summary | |
---|---|
AbstractTopology()
|
Method Summary | |
---|---|
void |
accept(TopologyVisitor visitor)
Accept a TopologyVisitor into the Topology to perform the actions
defined within the TopologyVisitor . |
void |
accept(Visitor<E> visitor)
Accept a vistitor and perform the visitor actions on this Topology. |
void |
clearBestEntity()
Clear the current best entity from the topology, thereby forcing a re-calculation of the best Entity within the topology. |
E |
getBestEntity()
Obtain the most fit Entity within the Topology . |
E |
getBestEntity(Comparator<? super E> comparator)
Obtain the Entity within the current Topology , based
on the provided Comparator instance. |
abstract Topology<E> |
getClone()
Create a cloned copy of the current object and return it. |
void |
update()
Perform any required updates to the Topology instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.cilib.entity.Topology |
---|
add, asList, clear, contains, containsAll, equals, get, getId, hashCode, isEmpty, iterator, neighbourhood, remove, remove, removeAll, retainAll, set, setId, size, toArray, toArray |
Methods inherited from interface java.util.List |
---|
add, addAll, addAll, indexOf, lastIndexOf, listIterator, listIterator, remove, subList |
Constructor Detail |
---|
public AbstractTopology()
Method Detail |
---|
public abstract Topology<E> getClone()
getClone
in interface Topology<E extends Entity>
getClone
in interface Cloneable
Object.clone()
public void accept(Visitor<E> visitor)
accept
in interface Topology<E extends Entity>
visitor
- The Visitor
to acceptpublic void accept(TopologyVisitor visitor)
TopologyVisitor
into the Topology
to perform the actions
defined within the TopologyVisitor
.
accept
in interface Topology<E extends Entity>
visitor
- The instance to accept into the Topology
.public E getBestEntity()
Entity
within the Topology
. This is
the same as getBestEntity(Comparator)
with a AscendingFitnessComparator
as the provided comparator.
getBestEntity
in interface Topology<E extends Entity>
getBestEntity(java.util.Comparator)
public E getBestEntity(Comparator<? super E> comparator)
Entity
within the current Topology
, based
on the provided Comparator
instance.
getBestEntity
in interface Topology<E extends Entity>
comparator
- The Comparator
to base the selection on.
public void clearBestEntity()
clearBestEntity
in interface Topology<E extends Entity>
public void update()
update
in interface Topology<E extends Entity>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |