lio.search.pso.neighbourhoods
Class RingNeighbourhood

java.lang.Object
  extended by lio.search.pso.neighbourhoods.RingNeighbourhood
All Implemented Interfaces:
LiOResource, Neighbourhood

public class RingNeighbourhood
extends java.lang.Object
implements Neighbourhood

Defines an order among particles and neighbourhood information of each one only refers to the best on its radio.


Constructor Summary
RingNeighbourhood()
           
 
Method Summary
 LiOResourceDefinition getDefinition()
          Return a LiOResDescription object which holds the name and all parameters that describe the resource.
 int getRatio()
           
 void setRatio(int ratio)
           
 void updateSwarmInformation(Particle[] swarm)
          Updates the neighbourhood structure if precise and the references of each particle to the global information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RingNeighbourhood

public RingNeighbourhood()
Method Detail

updateSwarmInformation

public void updateSwarmInformation(Particle[] swarm)
Updates the neighbourhood structure if precise and the references of each particle to the global information.

Specified by:
updateSwarmInformation in interface Neighbourhood
Parameters:
swarm - Group of particles to be updated.

getDefinition

public LiOResourceDefinition getDefinition()
Return a LiOResDescription object which holds the name and all parameters that describe the resource.

Specified by:
getDefinition in interface LiOResource
Returns:
A definition of the resource.

getRatio

public int getRatio()
Returns:
the ratio

setRatio

public void setRatio(int ratio)
Parameters:
ratio - the ratio to set