Class RegionLocation
java.lang.Object
uk.ac.manchester.spinnaker.machine.RegionLocation
- All Implemented Interfaces:
Comparable<RegionLocation>
,HasChipLocation
,HasCoreLocation
@Immutable public final class RegionLocation extends Object implements HasCoreLocation, Comparable<RegionLocation>
Holding case for a CoreLocation (X, Y and P) and the recording region ID.
- Author:
- Christian-B
-
Field Summary
Fields Modifier and Type Field Description static Comparator<RegionLocation>
COMPARATOR
Comparator for region locations.@uk.ac.manchester.spinnaker.machine.ValidP int
p
The Core's P value.int
region
The recording region ID.@uk.ac.manchester.spinnaker.machine.ValidX int
x
The Chip / Core's X value.@uk.ac.manchester.spinnaker.machine.ValidY int
y
The Chip / Core's Y value. -
Constructor Summary
Constructors Constructor Description RegionLocation(HasCoreLocation core, int region)
Creates the region based on a core and a region. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface uk.ac.manchester.spinnaker.machine.HasChipLocation
asChipLocation, getScampCore, onSameChipAs
Methods inherited from interface uk.ac.manchester.spinnaker.machine.HasCoreLocation
asCoreLocation, onSameCoreAs
-
Field Details
-
x
The Chip / Core's X value. -
y
The Chip / Core's Y value. -
p
The Core's P value. -
region
public final int regionThe recording region ID. -
COMPARATOR
Comparator for region locations.
-
-
Constructor Details
-
RegionLocation
Creates the region based on a core and a region.- Parameters:
core
- The core to useregion
- The ID of the region to use.
-
-
Method Details
-
getP
public int getP()- Specified by:
getP
in interfaceHasCoreLocation
- Returns:
- The processor coordinate of the core on its chip.
-
getX
public int getX()- Specified by:
getX
in interfaceHasChipLocation
- Returns:
- The X coordinate of the chip.
-
getY
public int getY()- Specified by:
getY
in interfaceHasChipLocation
- Returns:
- The Y coordinate of the chip.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<RegionLocation>
-
equals
-
toString
-
hashCode
public int hashCode()
-