laser.mpi.util.shuffle
Class Coordinate

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

public class Coordinate
extends java.lang.Object

A Coordinate is just a pair (proc, locPos) of ints representing a particular position of localData on a particular proc.


Field Summary
(package private)  int locPos
          The position in localData.
(package private)  int proc
          The process ID (rank).
 
Constructor Summary
Coordinate(int proc, int locPos)
          Constructs a new instance of Coordinate with the given process rank and local position.
 
Method Summary
 int locPos()
          Returns the position in localData (locPos).
 int proc()
          Returns the process rank (proc).
 java.lang.String toString()
          Returns a string representation of this Coordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

proc

int proc
The process ID (rank).


locPos

int locPos
The position in localData.

Constructor Detail

Coordinate

public Coordinate(int proc,
                  int locPos)
Constructs a new instance of Coordinate with the given process rank and local position.

Parameters:
proc - the procss ID (rank)
locPos - the position in localData
Throws:
java.lang.IllegalArgumentException - if proc or locPos is negative
Method Detail

toString

public java.lang.String toString()
Returns a string representation of this Coordinate. The form is (proc,locPos).

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this Coordinate

proc

public int proc()
Returns the process rank (proc).

Returns:
proc

locPos

public int locPos()
Returns the position in localData (locPos).

Returns:
locPos