|
||||||||||
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> net.sourceforge.cilib.entity.topologies.VonNeumannTopology<E>
E
- A Entity instance.public class VonNeumannTopology<E extends Entity>
Implementation of the Von Neumann neighbourhood topology. The Von Neumann topology is a two dimensional grid of particles with wrap around.
Refereces:
Constructor Summary | |
---|---|
VonNeumannTopology()
Creates a new instance of VonNeumannTopology . |
|
VonNeumannTopology(VonNeumannTopology<E> copy)
Copy constructor. |
Method Summary | ||
---|---|---|
boolean |
add(E particle)
Adds an entity to the topology. |
|
void |
add(int index,
E element)
|
|
boolean |
addAll(Collection<? extends E> set)
|
|
boolean |
addAll(int index,
Collection<? extends E> c)
|
|
List<E> |
asList()
Get all the entities within the topology. |
|
void |
clear()
Remove all the entities from the topology. |
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
boolean |
equals(Object o)
|
|
E |
get(int index)
|
|
VonNeumannTopology<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()
|
|
int |
indexOf(Object o)
|
|
boolean |
isEmpty()
|
|
Iterator<E> |
iterator()
|
|
int |
lastIndexOf(Object o)
|
|
ListIterator<E> |
listIterator()
|
|
ListIterator<E> |
listIterator(int index)
|
|
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 indiv)
Removes an entity from the topology. |
|
E |
remove(int index)
|
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
boolean |
retainAll(Collection<?> c)
|
|
E |
set(int index,
E indiv)
|
|
void |
setId(String id)
Set the id for this Topology. |
|
int |
size()
Returns the size of the Topology. |
|
List<E> |
subList(int fromIndex,
int toIndex)
|
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
|
Methods inherited from class net.sourceforge.cilib.entity.AbstractTopology |
---|
accept, accept, clearBestEntity, getBestEntity, getBestEntity, update |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VonNeumannTopology()
VonNeumannTopology
.
public VonNeumannTopology(VonNeumannTopology<E> copy)
copy
- The instance to copy.Method Detail |
---|
public VonNeumannTopology<E> getClone()
getClone
in interface Topology<E extends Entity>
getClone
in interface Cloneable
getClone
in class AbstractTopology<E extends Entity>
Object.clone()
public 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.
public Iterator<E> iterator()
public boolean add(E particle)
particle
- The entity to be added.
true
if the addition is successful, false
otherwise.public boolean addAll(Collection<? extends E> set)
public int size()
public boolean remove(E indiv)
indiv
- The entity to be removed.
public E get(int index)
public E set(int index, E indiv)
public List<E> asList()
public boolean isEmpty()
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
public boolean equals(Object o)
equals
in interface Collection<E extends Entity>
equals
in interface List<E extends Entity>
equals
in interface Topology<E extends Entity>
equals
in class Object
public int hashCode()
hashCode
in interface Collection<E extends Entity>
hashCode
in interface List<E extends Entity>
hashCode
in interface Topology<E extends Entity>
hashCode
in class Object
public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean addAll(int index, Collection<? extends E> c)
public void add(int index, E element)
public E remove(int index)
public int indexOf(Object o)
public int lastIndexOf(Object o)
public ListIterator<E> listIterator()
public ListIterator<E> listIterator(int index)
public List<E> subList(int fromIndex, int toIndex)
public String getId()
id
associated with this Topology, if
an id is defined.
id
for this Topology.public void setId(String id)
id
for this Topology.
id
- The value to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |