appl.parallel.spmd.split
Interface DataPartition

All Known Subinterfaces:
SplittableGrid, SplittableResource, WritableGridPartition
All Known Implementing Classes:
SplittableLLProxyGrid, WritableGridArrayPartition.Double, WritableGridArrayPartition.Float, WritableGridArrayPartition.Integer, XuluWritableGridFile

public interface DataPartition

Represents a data partition. It has an id which identifies the resource, which is the mother of the partition.

Author:
Dominik Appl

Method Summary
 DataPartition getEmpty(int newID)
          Creates an empty Object with the given id.
 DataPartition getPartition(Rectangle partitionBounds)
          Returns the partition specified by the given Rectangle.
 Rectangle getPartitionBounds()
          Returns the bounds of the partition as a rectangle.
 int getRootID()
          Returns the id of the super data structure this partition is a part of.
 void setPartition(DataPartition partition, Rectangle partitionBounds)
          Overwrites the data at the location specified by the Rectangle with the given partition-data.
 

Method Detail

getRootID

int getRootID()
Returns the id of the super data structure this partition is a part of.

Returns:
the id of the super data structure this partition is a part of.

getPartitionBounds

Rectangle getPartitionBounds()
Returns the bounds of the partition as a rectangle. The coordinates of the rectangle are global (which means relative to the root structure).

Returns:
the bounds of the partition as a rectangle. The coordinates of the rectangle are global (which means relative to the root structure).

getPartition

DataPartition getPartition(Rectangle partitionBounds)
Returns the partition specified by the given Rectangle. Note, that partitioning by a rectangle does not mean, that the underlying datastructure has to be 2D, but only that the splitting has to be at max. 2D.

Parameters:
partitionBounds - the bounds of the partition which are to be retrieved in global coordinates (the coordinates should be relative to the root-structure)

setPartition

void setPartition(DataPartition partition,
                  Rectangle partitionBounds)
Overwrites the data at the location specified by the Rectangle with the given partition-data.

Parameters:
partition - the new data
partitionBounds - the target location of the data (in coordinates of the root structure)

getEmpty

DataPartition getEmpty(int newID)
Creates an empty Object with the given id. (Used e.g. by Multi-Data-Objects)

Parameters:
newID - the id of the new Object
Returns:
an Empty element with the same dimension as this element.