laser.mpi.util.shuffle
Class Node

java.lang.Object
  |
  +--laser.mpi.util.shuffle.Node

class Node
extends java.lang.Object

The Node is the main data structure used to represent information about a particular coordinate which occurs (as a source or target) in the map.


Field Summary
(package private)  int locPos
          The local position (in the localData array) for the coordinate corresponding to this node.
(package private)  Node next
          The next node, i.e., the node (if any) to which this one is moved by map.
(package private)  Node nextSeg
          If segStart is true, this field is used to point to the next segment in the factor.
(package private)  Node prev
          The previous node, i.e., the node (if any) which is moved to this one by map.
(package private)  int proc
          The proc for the coordinate corresponding to this node.
(package private)  boolean reached
          Tells whether or not this node has been reached.
(package private)  Node segEnd
          If segStart is true, this field is used to point to the last node in this segment.
(package private)  boolean segStart
          This flag is set to true if this node starts a new segment.
 
Constructor Summary
(package private) Node(int proc, int locPos)
          Constructs a new Node with given proc and locPos.
 
Method Summary
 java.lang.String toBigString()
          Returns a more complete string representation of this Node, showing the values of all fields.
 java.lang.String toString()
          Returns a string representation of this Node of the form [proc,locPos;segStart,reached].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

next

Node next
The next node, i.e., the node (if any) to which this one is moved by map. May be null.


prev

Node prev
The previous node, i.e., the node (if any) which is moved to this one by map. May be null.


proc

int proc
The proc for the coordinate corresponding to this node.


locPos

int locPos
The local position (in the localData array) for the coordinate corresponding to this node.


segStart

boolean segStart
This flag is set to true if this node starts a new segment. A node starts a new segment if either node.prev is null, or if node.prev is non-null and node.prev and node have different procs. There is one other case where a node is considered to start a new segment: that is where a cycle is contained entirely in one proc. In that case an arbitrary node is selected to start the segment and the cycle is considered to consist of a single segment.


nextSeg

Node nextSeg
If segStart is true, this field is used to point to the next segment in the factor. If the factor is a cycle, this will not be null. If it is a shift, only the last segment will have null nextSeg. This field is not used if segStart = false.


segEnd

Node segEnd
If segStart is true, this field is used to point to the last node in this segment.


reached

boolean reached
Tells whether or not this node has been reached. This is used by getNextFactor to keep track of which nodes have been reached.

Constructor Detail

Node

Node(int proc,
     int locPos)
Constructs a new Node with given proc and locPos.

Parameters:
proc - the process rank (ID) for the coordinate corresponding to this Node
locPos - the position in localData for the coordinate corresponding to this Node
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this Node of the form [proc,locPos;segStart,reached].

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this Node

toBigString

public java.lang.String toBigString()
Returns a more complete string representation of this Node, showing the values of all fields.

Returns:
a longer string representation of this Node