|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectappl.parallel.spmd.split.AbstractSplitMap
public abstract class AbstractSplitMap
This class can be used for the implementation of SplitMap
s. It already
provides most of the functions. Normally subclasses only have to implement the methods
SplitMap.makeMap()
and SplitMap.getNeighborsForPosition(int)
.
SplitMap
,
Serialized FormNested Class Summary | |
---|---|
static class |
AbstractSplitMap.NeighborhoodBoxingMode
|
Field Summary | |
---|---|
protected AbstractSplitMap.NeighborhoodBoxingMode |
boxingMode
|
protected Rectangle |
globalBounds
the Rectangle of the whole Grid |
protected int |
globalHeight
|
protected int |
globalWidth
|
protected String[] |
IPs
|
protected int |
neighborhoodRange
|
protected int |
noOfPartitions
|
protected Rectangle[] |
partitionCalculationBounds
the calculation area of each partition |
protected Rectangle[] |
partitionNeighborhoodBounds
the bounds of the neighborhood data of the partition |
protected double[] |
weights
a value of weights determines how big the share of the partition with this position is. |
Constructor Summary | |
---|---|
AbstractSplitMap()
|
|
AbstractSplitMap(int width,
int height,
int neighborhoodRange,
int noOfPartitions,
AbstractSplitMap.NeighborhoodBoxingMode boxingMode)
|
|
AbstractSplitMap(SplittableResource splittable,
int neighborhoodRange,
int noOfPartitions,
AbstractSplitMap.NeighborhoodBoxingMode boxingMode)
|
Method Summary | |
---|---|
int |
getCount()
|
abstract String |
getDescription()
|
Rectangle |
getGlobalBounds()
|
Rectangle |
getGlobalCalculationBounds()
|
String |
getIP(int pos)
|
Rectangle |
getLocalBounds(int pos)
Gets the whole partition bounds (including available neighborhood) |
Rectangle |
getLocalCalculationBounds(int pos)
|
Rectangle |
getLocalNeighborhoodBounds(int pos)
|
int |
getNeighborhoodRange()
|
abstract int[] |
getNeighborsForPosition(int pos)
returns an Array of neighbors for that position in the splitmap. |
Rectangle |
getPartitionBounds(int pos)
|
Rectangle |
getPartitionCalculationBounds(int pos)
|
Rectangle |
getPartitionNeighborhoodBounds(int pos)
|
protected void |
init()
Initializes the bounds of the partitions |
abstract void |
makeMap()
Creates the map |
void |
setIPs(String[] IPs)
|
void |
setParameters(SplittableResource splittable,
int neighborhoodRange,
int noOfPartitions,
AbstractSplitMap.NeighborhoodBoxingMode boxingMode)
Sets the given values. |
void |
setWeights(double... weights)
With this setter, you can assign each partition a weight, so that the data you split is not splitted equally, but arcording to these values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AbstractSplitMap.NeighborhoodBoxingMode boxingMode
protected int noOfPartitions
protected int globalHeight
protected int globalWidth
protected double[] weights
protected int neighborhoodRange
protected Rectangle globalBounds
protected Rectangle[] partitionCalculationBounds
protected Rectangle[] partitionNeighborhoodBounds
protected String[] IPs
Constructor Detail |
---|
public AbstractSplitMap(SplittableResource splittable, int neighborhoodRange, int noOfPartitions, AbstractSplitMap.NeighborhoodBoxingMode boxingMode)
public AbstractSplitMap()
public AbstractSplitMap(int width, int height, int neighborhoodRange, int noOfPartitions, AbstractSplitMap.NeighborhoodBoxingMode boxingMode)
width
- height
- neighborhoodRange
- noOfPartitions
- boxingMode
- Method Detail |
---|
public void setParameters(SplittableResource splittable, int neighborhoodRange, int noOfPartitions, AbstractSplitMap.NeighborhoodBoxingMode boxingMode)
SplitMap
setParameters
in interface SplitMap
splittable
- the resource on which the splitmap is calculatedneighborhoodRange
- the neighborhoodrangenoOfPartitions
- the number of partitions to be generatedboxingMode
- the boxing modeprotected void init()
public void setWeights(double... weights)
SplitMap
setWeights
in interface SplitMap
public abstract String getDescription()
getDescription
in interface SplitMap
public abstract int[] getNeighborsForPosition(int pos)
SplitMap
getNeighborsForPosition
in interface SplitMap
pos
- position in splitmap
public abstract void makeMap()
SplitMap
makeMap
in interface SplitMap
public Rectangle getGlobalCalculationBounds()
getGlobalCalculationBounds
in interface SplitMap
SplitMap.getGlobalBounds()
public Rectangle getLocalCalculationBounds(int pos)
getLocalCalculationBounds
in interface SplitMap
pos
- the partition number
public Rectangle getLocalNeighborhoodBounds(int pos)
getLocalNeighborhoodBounds
in interface SplitMap
pos
- the partition number
public Rectangle getPartitionCalculationBounds(int pos)
getPartitionCalculationBounds
in interface SplitMap
pos
- the partition number
public Rectangle getPartitionNeighborhoodBounds(int pos)
getPartitionNeighborhoodBounds
in interface SplitMap
pos
- the partition number
public Rectangle getGlobalBounds()
getGlobalBounds
in interface SplitMap
public Rectangle getPartitionBounds(int pos)
getPartitionBounds
in interface SplitMap
pos
- the partition number
SplitMap.getPartitionNeighborhoodBounds(int)
public Rectangle getLocalBounds(int pos)
SplitMap
getLocalBounds
in interface SplitMap
pos
- the partition number
public String getIP(int pos)
getIP
in interface SplitMap
pos
- position for this splitmap
public void setIPs(String[] IPs)
setIPs
in interface SplitMap
IPs
- a String Array of IPs which are mapped to the partition in the given order.public int getNeighborhoodRange()
getNeighborhoodRange
in interface SplitMap
public int getCount()
getCount
in interface SplitMap
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |