Enum Direction

java.lang.Object
java.lang.Enum<Direction>
uk.ac.manchester.spinnaker.alloc.model.Direction
All Implemented Interfaces:
Serializable, Comparable<Direction>

public enum Direction
extends Enum<Direction>
Represents link directions of a board.

SpiNNaker board neighbourhood

Note how this is tilted over with respect to classical compass directions; to actually go "true vertically north", you have to go first N and then NW (or vice versa), taking two boards to actually go straight north (by an offset of 12 chips); a is vertically north of c, and f is vertically north of d.

Author:
Donal Fellows
See Also:
DirInfo
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    E
    Eastward, from x to b.
    N
    Northward, from x to a.
    NW
    Northwest, from x to f.
    S
    Southward, from x to d.
    SE
    Southeast, from x to c.
    W
    Westward, from x to e.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    int bank
    The register bank that manages the link in this direction.
    String columnName
    The name of the column in the pending_changes table that holds information pertaining to this link.
    FPGA fpga
    The FPGA that manages the link in this direction.
  • Method Summary

    Modifier and Type Method Description
    Direction opposite()
    Gets the direction of the link in the opposite direction.
    static Direction valueOf​(String name)
    Returns the enum constant of this type with the specified name.
    static Direction[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • N

      public static final Direction N
      Northward, from x to a.
    • E

      public static final Direction E
      Eastward, from x to b.
    • SE

      public static final Direction SE
      Southeast, from x to c.
    • S

      public static final Direction S
      Southward, from x to d.
    • W

      public static final Direction W
      Westward, from x to e.
    • NW

      public static final Direction NW
      Northwest, from x to f.
  • Field Details

    • fpga

      public final FPGA fpga
      The FPGA that manages the link in this direction. Note that the names of FPGA identifiers don't exactly match up with the direction names in this class. This mostly doesn't matter; the only real confusion is right here in the definitions of these directions.
    • bank

      public final int bank
      The register bank that manages the link in this direction.
    • columnName

      public final String columnName
      The name of the column in the pending_changes table that holds information pertaining to this link.
  • Method Details

    • values

      public static Direction[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Direction valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • opposite

      public Direction opposite()
      Gets the direction of the link in the opposite direction. Only really valid for SpiNN-5 boards.
      Returns:
      The opposite direction.