org.objectweb.proactive.core.group.topology
Class Torus

java.lang.Object
  |
  +--org.objectweb.proactive.core.body.proxy.AbstractProxy
        |
        +--org.objectweb.proactive.core.group.ProxyForGroup
              |
              +--org.objectweb.proactive.core.group.topology.TopologyGroup
                    |
                    +--org.objectweb.proactive.core.group.topology.Ring
                          |
                          +--org.objectweb.proactive.core.group.topology.Torus
All Implemented Interfaces:
java.util.Collection, Group, Proxy, java.io.Serializable
Direct Known Subclasses:
TorusCube

public class Torus
extends Ring

This class represents a group by a cycling two-dimensional topology.

Author:
Laurent Baduel
See Also:
Serialized Form

Field Summary
protected  int height
          height of the two-dimensional topology group
 
Fields inherited from class org.objectweb.proactive.core.group.topology.Ring
width
 
Fields inherited from class org.objectweb.proactive.core.group.ProxyForGroup
className, dispatching, logger, memberList, stub, uniqueSerialization, waited
 
Constructor Summary
protected Torus(Group g, int nbMembers)
          Construtor.
  Torus(Group g, int height, int width)
          Construtor.
 
Method Summary
 Ring column(int column)
          Returns the column (one-dimensional topology group) with the specified number
 Ring column(java.lang.Object o)
          Returns the column that contains the specified object
 java.lang.Object down(java.lang.Object o)
          Returns the object at the down of the specified object in the two-dimensional topology group
 int getHeight()
          Returns the height of the two-dimensional topology group (number of Rings)
 int getWidth()
          Return the max size of the Ring
 int getX(java.lang.Object o)
          Returns the X-coordonate of the specified object
 int getY(java.lang.Object o)
          Returns the Y-coordonate of the specified object
 java.lang.Object left(java.lang.Object o)
          Returns the object at the left of the specified object in the two-dimensional topology group
 java.lang.Object right(java.lang.Object o)
          Returns the object at the right of the specified object in the two-dimensional topology group
 Ring Ring(int Ring)
          Returns the Ring (one-dimensional topology group) with the specified number
 Ring Ring(java.lang.Object o)
          Returns the Ring that contains the specified object
 java.lang.Object up(java.lang.Object o)
          Returns the object at the up of the specified object in the two-dimensional topology group
 
Methods inherited from class org.objectweb.proactive.core.group.ProxyForGroup
add, addAll, addMerge, addToListOfResult, allArrived, allAwaited, asynchronousCallOnGroup, barrier, clear, contains, containsAll, createMemberWithMultithread, difference, display, equals, exclude, get, getExceptionList, getGroupByType, getType, getTypeName, hashCode, indexOf, intersection, isDispatchingOn, isEmpty, iterator, listIterator, oneWayCallOnGroup, purgeExceptionAndNull, range, reify, remove, remove, removeAll, retainAll, set, setDispatchingOff, setDispatchingOn, setRatioNemberToThread, setSPMDGroup, setUniqueSerializationOff, setUniqueSerializationOn, size, toArray, toArray, union, waitAll, waitAndGetOne, waitAndGetTheNth, waitN, waitOne, waitOneAndGetIndex, waitTheNth
 
Methods inherited from class org.objectweb.proactive.core.body.proxy.AbstractProxy
isAsynchronousCall, isOneWayCall
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

height

protected int height
height of the two-dimensional topology group

Constructor Detail

Torus

public Torus(Group g,
             int height,
             int width)
      throws ConstructionOfReifiedObjectFailedException
Construtor. The members of g are used to fill the topology group.

Parameters:
g - - the group used a base for the new group (topology)
height - - the heigth of the two-dimensional topology group
width - - the width of the two-dimensional topology group
Throws:
ConstructionOfReifiedObjectFailedException

Torus

protected Torus(Group g,
                int nbMembers)
         throws ConstructionOfReifiedObjectFailedException
Construtor. The members of g are used to fill the topology group.

Parameters:
g - - the group used a base for the new group (topology)
Throws:
ConstructionOfReifiedObjectFailedException
Method Detail

getWidth

public int getWidth()
Return the max size of the Ring

Overrides:
getWidth in class Ring
Returns:
the max size of the one-dimensional topology group (i.e. the Ring)

getHeight

public int getHeight()
Returns the height of the two-dimensional topology group (number of Rings)

Returns:
the height of the two-dimensional topology group

getX

public int getX(java.lang.Object o)
Returns the X-coordonate of the specified object

Overrides:
getX in class Ring
Parameters:
o - - the object
Returns:
the position (in X) of the object in the Torus

getY

public int getY(java.lang.Object o)
Returns the Y-coordonate of the specified object

Parameters:
o - - the object
Returns:
the position (in Y) of the object in the Torus

left

public java.lang.Object left(java.lang.Object o)
Returns the object at the left of the specified object in the two-dimensional topology group

Overrides:
left in class Ring
Parameters:
o - - the specified object
Returns:
the object at the left of o. If there is no object at the left of o, return null

right

public java.lang.Object right(java.lang.Object o)
Returns the object at the right of the specified object in the two-dimensional topology group

Overrides:
right in class Ring
Parameters:
o - - the specified object
Returns:
the object at the right of o. If there is no object at the right of o, return null

up

public java.lang.Object up(java.lang.Object o)
Returns the object at the up of the specified object in the two-dimensional topology group

Parameters:
o - - the specified object
Returns:
the object at the up of o. If there is no object at the up of o, return null

down

public java.lang.Object down(java.lang.Object o)
Returns the object at the down of the specified object in the two-dimensional topology group

Parameters:
o - - the specified object
Returns:
the object at the down of o. If there is no object at the down of o, return null

Ring

public Ring Ring(int Ring)
Returns the Ring (one-dimensional topology group) with the specified number

Parameters:
Ring - - the number of the Ring
Returns:
the one-dimensional topology group formed by the Ring in the two-dimensional topology group, return null if the the specified Ring is incorrect

Ring

public Ring Ring(java.lang.Object o)
Returns the Ring that contains the specified object

Parameters:
o - - the object
Returns:
the one-dimensional topology group formed by the Ring of the object in the two-dimensional topology group

column

public Ring column(int column)
Returns the column (one-dimensional topology group) with the specified number

Parameters:
column - - the number of the Ring
Returns:
the one-dimensional topology group formed by the column in the two-dimensional topology group, return null if the the specified Ring is incorrect

column

public Ring column(java.lang.Object o)
Returns the column that contains the specified object

Parameters:
o - - the object
Returns:
the one-dimensional topology group formed by the column of the object in the two-dimensional topology group


Copyright © April 2004 INRIA All Rights Reserved.