|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - All types derived from Entity.public interface Topology<E extends Entity>
This is a generalization for all algorithms that maintain a collection of Entity objects. Examples of this would include PSO, EC and ACO.
| 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. |
|
boolean |
add(E entity)
Adds an entity to the topology. |
|
List<E> |
asList()
Get all the entities within the topology. |
|
void |
clear()
Remove all the entities from the topology. |
|
void |
clearBestEntity()
Clear the current best entity from the topology, thereby forcing a re-calculation of the best Entity within the topology. |
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
boolean |
equals(Object o)
|
|
E |
get(int index)
|
|
E |
getBestEntity()
Obtain the current best entity within the Topology. |
|
E |
getBestEntity(Comparator<? super E> comparator)
Obtain the current best entity within the Topology, based
on the provided Comparator. |
|
Topology<E> |
getClone()
Create a cloned copy of the current object and return it. |
|
String |
getId()
Get the id associated with this Topology, if
an id is defined. |
|
int |
hashCode()
|
|
boolean |
isEmpty()
|
|
Iterator<E> |
iterator()
|
|
Iterator<E> |
neighbourhood(Iterator<? extends Entity> iterator)
Returns an Iterator over all particles in the neighbourhood of
the particle referred to by the given Iterator. |
|
boolean |
remove(E entity)
Removes an entity from the topology. |
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
boolean |
retainAll(Collection<?> c)
|
|
E |
set(int index,
E entity)
|
|
void |
setId(String id)
Set the id for this Topology. |
|
int |
size()
Returns the size of the Topology. |
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
void |
update()
Perform any required updates to the Topology instance. |
|
| Methods inherited from interface java.util.List |
|---|
add, addAll, addAll, indexOf, lastIndexOf, listIterator, listIterator, remove, subList |
| Method Detail |
|---|
Topology<E> getClone()
getClone in interface CloneableObject.clone()boolean add(E entity)
add in interface Collection<E extends Entity>add in interface List<E extends Entity>entity - The entity to be added.
true if the addition is successful, false otherwise.boolean remove(E entity)
entity - The entity to be removed.
E get(int index)
get in interface List<E extends Entity>
E set(int index,
E entity)
set in interface List<E extends Entity>boolean isEmpty()
isEmpty in interface Collection<E extends Entity>isEmpty in interface List<E extends Entity>void clear()
clear in interface Collection<E extends Entity>clear in interface List<E extends Entity>boolean contains(Object o)
contains in interface Collection<E extends Entity>contains in interface List<E extends Entity>boolean containsAll(Collection<?> c)
containsAll in interface Collection<E extends Entity>containsAll in interface List<E extends Entity>boolean equals(Object o)
equals in interface Collection<E extends Entity>equals in interface List<E extends Entity>equals in class Objectint hashCode()
hashCode in interface Collection<E extends Entity>hashCode in interface List<E extends Entity>hashCode in class ObjectIterator<E> iterator()
iterator in interface Collection<E extends Entity>iterator in interface Iterable<E extends Entity>iterator in interface List<E extends Entity>boolean remove(Object o)
remove in interface Collection<E extends Entity>remove in interface List<E extends Entity>boolean removeAll(Collection<?> c)
removeAll in interface Collection<E extends Entity>removeAll in interface List<E extends Entity>boolean retainAll(Collection<?> c)
retainAll in interface Collection<E extends Entity>retainAll in interface List<E extends Entity>int size()
size in interface Collection<E extends Entity>size in interface List<E extends Entity>Object[] toArray()
toArray in interface Collection<E extends Entity>toArray in interface List<E extends Entity><T> T[] toArray(T[] a)
toArray in interface Collection<E extends Entity>toArray in interface List<E extends Entity>String getId()
id associated with this Topology, if
an id is defined.
id for this Topology.void setId(String id)
id for this Topology.
id - The value to set.List<E> asList()
E getBestEntity()
Topology.
Entity.E getBestEntity(Comparator<? super E> comparator)
Topology, based
on the provided Comparator.
comparator - The Comparator to use.
Entity based on the defined comparison.void accept(Visitor<E> visitor)
visitor - The Visitor to acceptvoid accept(TopologyVisitor visitor)
TopologyVisitor into the Topology to perform the actions
defined within the TopologyVisitor.
visitor - The instance to accept into the Topology.void update()
Iterator<E> neighbourhood(Iterator<? extends Entity> iterator)
Iterator over all particles in the neighbourhood of
the particle referred to by the given Iterator.
iterator - An iterator that refers to a particle in this topology.
void clearBestEntity()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||