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
FieldsModifier and TypeFieldDescriptionstatic final Comparator<RegionLocation>Comparator for region locations.final @uk.ac.manchester.spinnaker.machine.ValidP intThe Core's P value.final intThe recording region ID.final @uk.ac.manchester.spinnaker.machine.ValidX intThe Chip / Core's X value.final @uk.ac.manchester.spinnaker.machine.ValidY intThe Chip / Core's Y value. -
Constructor Summary
ConstructorsConstructorDescriptionRegionLocation(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, waitMethods inherited from interface uk.ac.manchester.spinnaker.machine.HasChipLocation
asChipLocation, getScampCore, onSameChipAsMethods 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:
getPin interfaceHasCoreLocation- Returns:
- The processor coordinate of the core on its chip.
-
getX
public int getX()- Specified by:
getXin interfaceHasChipLocation- Returns:
- The X coordinate of the chip.
-
getY
public int getY()- Specified by:
getYin interfaceHasChipLocation- Returns:
- The Y coordinate of the chip.
-
compareTo
- Specified by:
compareToin interfaceComparable<RegionLocation>
-
equals
-
toString
-
hashCode
public int hashCode()
-