net.sourceforge.cilib.entity.topologies
Class HypercubeTopology<E extends Entity>
java.lang.Object
net.sourceforge.cilib.entity.AbstractTopology<E>
net.sourceforge.cilib.entity.topologies.GBestTopology<E>
net.sourceforge.cilib.entity.topologies.HypercubeTopology<E>
- Type Parameters:
E
- The Entity type.
- All Implemented Interfaces:
- Serializable, Iterable<E>, Collection<E>, List<E>, Topology<E>, Cloneable
public class HypercubeTopology<E extends Entity>
- extends GBestTopology<E>
- Author:
- Gareth David
- See Also:
- Serialized Form
Methods inherited from class net.sourceforge.cilib.entity.topologies.GBestTopology |
add, add, addAll, addAll, asList, clear, contains, containsAll, equals, get, getId, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, remove, removeAll, retainAll, set, setId, size, subList, toArray, toArray |
HypercubeTopology
public HypercubeTopology()
HypercubeTopology
public HypercubeTopology(HypercubeTopology<E> copy)
getClone
public HypercubeTopology<E> getClone()
- Create a cloned copy of the current object and return it. In general
the created copy will be a deep copy of the provided instance. As
a result this operation an be quite expensive if used incorrectly.
- Specified by:
getClone
in interface Topology<E extends Entity>
- Specified by:
getClone
in interface Cloneable
- Overrides:
getClone
in class GBestTopology<E extends Entity>
- Returns:
- An exact clone of the current object instance.
- See Also:
Object.clone()
neighbourhood
public 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
.
- Specified by:
neighbourhood
in interface Topology<E extends Entity>
- Overrides:
neighbourhood
in class GBestTopology<E extends Entity>
- Parameters:
iterator
- An iterator that refers to a particle in this topology.
- Returns:
- A particle iterator.
setNeighbourhoodSize
public void setNeighbourhoodSize(int neighbourhoodSize)
- Sets the number particles in the neighbourhood of each particle. The default is 5.
- Parameters:
neighbourhoodSize
- The size of the neighbourhood.
getNeighbourhoodSize
public int getNeighbourhoodSize()
- Accessor for the number of particles in a neighbourhood.
- Returns:
- The size of the neighbourhood.
Copyright © 2009 CIRG. All Rights Reserved.