Jumpi v1.2.0

org.jumpi.impl.connector.mpi11
Class MpiGroupMembershipInfo

java.lang.Object
  |
  +--org.jumpi.impl.connector.mpi11.MpiGroupMembershipInfo

public class MpiGroupMembershipInfo
extends java.lang.Object

A Group of communicating Processors in MPI. A Group is invariable since no Processor can enter or leave the Group once it is formed.


Constructor Summary
MpiGroupMembershipInfo(Destination group, Destination wildcard, Destination[] members, int rank)
          Creates a new MpiGroupMembershipInfo object.
 
Method Summary
 Destination getGroup()
          Return the Destination representing the Group itself.
 Destination getMember(int rank)
          Return the Member which has a specific rank in the Group.
 Destination[] getMembers()
          Return the list of Group members.
 int getRank()
          Return the rank of this Processor in the Group.
 int getSize()
          Return the number of members in the Group.
 Destination getWildcard()
          Return the wildcard Destination representing any member of the Group.
 java.lang.String toString()
          A String representation of the Group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MpiGroupMembershipInfo

public MpiGroupMembershipInfo(Destination group,
                              Destination wildcard,
                              Destination[] members,
                              int rank)
Creates a new MpiGroupMembershipInfo object.

Parameters:
group - a Destination representing the Group itself.
wildcard - a Destination representing any Processor in the Group.
members - an ordered list of individual Group members.
rank - the rank, index in members, of this member in the Group.
Throws:
java.lang.IllegalArgumentException - if any Destinations are null, or rank < 0.
Method Detail

getGroup

public Destination getGroup()
Return the Destination representing the Group itself.

Returns:
the Destination representing the Group itself.

getWildcard

public Destination getWildcard()
Return the wildcard Destination representing any member of the Group.

Returns:
the wildcard Destination representing any member of the Group.

getMembers

public Destination[] getMembers()
Return the list of Group members. Never change this array.

Returns:
the list of Group members.

getMember

public Destination getMember(int rank)
Return the Member which has a specific rank in the Group. The rank must be between 0 and getMembers().length-1.

Parameters:
rank - the rank of this Processor in the Group.
Returns:
the Member which has the specific rank in the Group.
Throws:
java.lang.IllegalArgumentException - if the rank is < 0 or > length-1.

getRank

public int getRank()
Return the rank of this Processor in the Group.

Returns:
the rank of this Processor in the Group.

getSize

public int getSize()
Return the number of members in the Group.

Returns:
the number of members in the Group.

toString

public java.lang.String toString()
A String representation of the Group.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the Group.

Jumpi v1.2.0

Copyright © 2003, Peter Jonathan Klauser.