Class RingTopology
java.lang.Object
org.moeaframework.parallel.island.topology.RingTopology
- All Implemented Interfaces:
Topology
A ring topology where each island is only connected to one (unidirectional) or two adjacent islands (bidirectional),
thus forming the shape of a ring.
-
Constructor Summary
ConstructorDescriptionConstructs a bidirectional ring topology instance.RingTopology
(boolean bidirectional) Constructs a ring topology instance. -
Method Summary
-
Constructor Details
-
RingTopology
public RingTopology()Constructs a bidirectional ring topology instance. -
RingTopology
public RingTopology(boolean bidirectional) Constructs a ring topology instance.- Parameters:
bidirectional
-true
if the ring connects to both neighbors;false
if only one
-
-
Method Details
-
getNeighbors
Description copied from interface:Topology
Returns the neighboring islands for the current island.- Specified by:
getNeighbors
in interfaceTopology
- Parameters:
current
- the current islandallIslands
- the list of all islands- Returns:
- the neighboring islands
-