|
||||||||||
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.GBestTopology<E>
E
- The Entity type.public class GBestTopology<E extends Entity>
Implementation of the gbest neighbourhood topology.
References:
Nested Class Summary | |
---|---|
protected static interface |
GBestTopology.IndexedIterator<T extends Entity>
Interface to define the manner in which the iterator is to be constructed for Array types. |
Field Summary | |
---|---|
protected LinkedList<E> |
entities
|
Constructor Summary | |
---|---|
GBestTopology()
Creates a new instance of GBestTopology . |
|
GBestTopology(GBestTopology<E> copy)
|
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 entity)
|
|
boolean |
containsAll(Collection<?> c)
|
|
boolean |
equals(Object o)
|
|
E |
get(int index)
|
|
GBestTopology<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 particle)
|
|
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 |
Field Detail |
---|
protected LinkedList<E extends Entity> entities
Constructor Detail |
---|
public GBestTopology()
GBestTopology
.
public GBestTopology(GBestTopology<E> copy)
Method Detail |
---|
public GBestTopology<E> getClone()
AbstractTopology
getClone
in interface Topology<E extends Entity>
getClone
in interface Cloneable
getClone
in class AbstractTopology<E extends Entity>
Object.clone()
public Iterator<E> iterator()
Topology
public Iterator<E> neighbourhood(Iterator<? extends Entity> iterator)
Topology
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 boolean add(E particle)
Topology
particle
- The entity to be added.
true
if the addition is successful, false
otherwise.public boolean addAll(Collection<? extends E> set)
public int size()
Topology
public boolean remove(E indiv)
Topology
indiv
- The entity to be removed.
public E get(int index)
Topology
public E set(int index, E particle)
Topology
public List<E> asList()
Topology
public boolean isEmpty()
Topology
public void clear()
Topology
public boolean contains(Object entity)
Topology
public boolean containsAll(Collection<?> c)
Topology
public boolean equals(Object o)
Topology
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()
Topology
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)
Topology
public boolean removeAll(Collection<?> c)
Topology
public boolean retainAll(Collection<?> c)
Topology
public Object[] toArray()
Topology
public <T> T[] toArray(T[] a)
Topology
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()
Topology
id
associated with this Topology, if
an id is defined.
id
for this Topology.public void setId(String id)
Topology
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 |