Constructor and Description |
---|
GenericTopology(int numberInstances)
The topology
|
Modifier and Type | Method and Description |
---|---|
void |
addNeighbour(int neighindex1,
int neighindex2)
Specifies that module neighindex2 is a neighbour of module neighindex1,
but not the other way around.
|
boolean |
areNeighbours(int neighindex1,
int neighindex2)
Method determining whether one module in neighbour of another in the
defined Topology
|
int[] |
getNeighbourIndices(int index)
Returns a vector containing the indices of neighbouring modules
|
int |
getNumberInstances() |
int |
getNumberNeighbours(int index) |
boolean |
hasNeighbours(int index) |
void |
removeNeighbour(int neighindex1,
int neighindex2) |
public GenericTopology(int numberInstances)
numberInstances
- the number of identical modulespublic int getNumberInstances()
getNumberInstances
in interface Topology
public void addNeighbour(int neighindex1, int neighindex2)
addNeighbour
in interface Topology
neighindex1
- indicates the index of the first moduleneighindex2
- indicates the index of the second modulepublic void removeNeighbour(int neighindex1, int neighindex2)
removeNeighbour
in interface Topology
neighindex1
- indicates the index of the first moduleneighindex2
- indicates the index of the second modulepublic boolean areNeighbours(int neighindex1, int neighindex2)
areNeighbours
in interface Topology
neighindex1
- Index of first module (starting in 0)neighindex2
- Index of second module (starting in 0)public boolean hasNeighbours(int index)
hasNeighbours
in interface Topology
index
- A module indexpublic int getNumberNeighbours(int index)
getNumberNeighbours
in interface Topology
index
- A module indexpublic int[] getNeighbourIndices(int index)
getNeighbourIndices
in interface Topology
index
- the index of the given moduleCopyright © 2005–2020. All rights reserved.