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
ConstructorsConstructorDescriptionConstructs 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-trueif the ring connects to both neighbors;falseif only one
-
-
Method Details
-
getNeighbors
Description copied from interface:TopologyReturns the neighboring islands for the current island.- Specified by:
getNeighborsin interfaceTopology- Parameters:
current- the current islandallIslands- the list of all islands- Returns:
- the neighboring islands
-