|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.unh.sdb.datasource.ISPartitioning
edu.unh.sdb.datasource.RegularISPartitioning
public class RegularISPartitioning
This class implements a regular partitioning of a bounded index space. A partitioning divides the space into some number of partitions. For regular partitionings, these partitions are all the same size and shape, except for those that span an edge of the index space. (That is, it is possible that partitions near the edge may be clipped by the index space bounds.) A regular partitioning can be specified either by giving the dimensions of a partition to the constructor, or by specifying how many partitions each axis should be divided into.
Field Summary | |
---|---|
protected long[] |
axisWeights
|
protected AxisOrdering |
ordering
|
protected int[] |
partitionDimensions
|
protected int[] |
tempCoords
|
Fields inherited from class edu.unh.sdb.datasource.ISPartitioning |
---|
dimensionality |
Constructor Summary | |
---|---|
RegularISPartitioning(IndexSpaceID partitionDimensions,
ISBounds spaceBounds)
The first argument specifies the shape of each partition, not the dimensions of the partSpace. |
|
RegularISPartitioning(IndexSpaceID partitionDimensions,
ISBounds spaceBounds,
AxisOrdering ordering)
The first argument specifies the shape of each partition, not the dimensions of the partSpace. |
|
RegularISPartitioning(ISBounds partitioningBounds,
ISBounds spaceBounds)
Deprecated. |
|
RegularISPartitioning(ISBounds partitioningBounds,
ISBounds spaceBounds,
AxisOrdering ordering)
|
Method Summary | |
---|---|
long |
containingOffset(IndexSpaceID id)
Map the index space id onto the partitioning space and return the 1D offset of the containing partition. |
long |
elementOffset(IndexSpaceID id)
Return the 1D offset of the element specified by the id. |
int |
getContainingPartitionBoundary(IndexSpaceID id,
int axis,
boolean upper)
If upper is true, return the upper value of the specified axis of the partition containing the id, otherwise, return the lower value. |
ISBounds |
getContainingPartitionBounds(IndexSpaceID id)
Return the bounds of the partition that contains the given id. |
ISBounds |
getContainingPartitionBounds(IndexSpaceID id,
ISBounds bounds)
Sets the ISBounds argument to the bounds of the partition that contains the given id. |
ISBounds |
getGeometricBounds()
add by xuan |
ISBounds |
getIndexedBounds(ISBounds bounds,
IndexSpaceID partitioningIndex)
Sets the argument ISBounds to the bounds corresponding to the partitioning ID. |
ISBounds |
getOffsetBounds(ISBounds bounds,
long offset)
Sets the argument ISBounds to the bounds corresponding to the partition offset. |
IndexSpaceID |
getOffsetID(IndexSpaceID id,
long offset)
Sets the argument ISID to the value corresponding to the 1D partition offset. |
IndexSpaceID |
getOffsetID(long offset)
Returns a new ISID corresponding to the 1D partition offset. |
int |
getPartitionBoundary(IndexSpaceID partitionID,
int axis,
boolean upper)
If upper is true, return the upper value of the specified axis of the partition specified by the partition id, otherwise, return the lower value. |
ISBoundsIterator |
getPartitionIterator(ISBounds subSpace)
|
ISBoundsIterator |
getPartitionIterator(ISBounds subSpace,
ISBoundsIterator iter)
|
static void |
main(java.lang.String argv)
|
IndexSpaceID |
map(IndexSpaceID p)
Map the id onto the partitioning. |
IndexSpaceID |
map(IndexSpaceID s,
IndexSpaceID d)
Map the first argument onto the partitioning, placing the result in the second argument. |
ISBounds |
map(ISBounds bounds)
Map the bounds onto the partitioning, returning a new ISBounds. |
ISBounds |
mapToSpace(IndexSpaceID partitionID)
map partition ID to space ISBounds |
ISBounds |
mapToSpace(ISBounds partitionBounds)
map a partition ISBounds to space ISBounds |
long |
partitionOffset(IndexSpaceID id)
Map the partition space id to its 1D offset. |
long |
partitionVolume()
Return the volume of a single partition. |
RegularISPartitioning |
project(int axis)
|
java.lang.String |
toString()
Return a String representing the object. |
java.lang.String |
toString(java.lang.String indent)
Return a String representing the object indented by the argument string. |
long |
volume()
Return the total number of partitions. |
Methods inherited from class edu.unh.sdb.datasource.ISPartitioning |
---|
dim, getISIterator, getPartitioningBounds, getPartitioningDimensions, getSpaceBounds, inBounds, inBounds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int[] partitionDimensions
protected long[] axisWeights
protected int[] tempCoords
protected AxisOrdering ordering
Constructor Detail |
---|
public RegularISPartitioning(ISBounds partitioningBounds, ISBounds spaceBounds)
public RegularISPartitioning(ISBounds partitioningBounds, ISBounds spaceBounds, AxisOrdering ordering)
public RegularISPartitioning(IndexSpaceID partitionDimensions, ISBounds spaceBounds)
public RegularISPartitioning(IndexSpaceID partitionDimensions, ISBounds spaceBounds, AxisOrdering ordering)
Method Detail |
---|
public RegularISPartitioning project(int axis)
public final IndexSpaceID map(IndexSpaceID p)
map
in class ISPartitioning
public final IndexSpaceID map(IndexSpaceID s, IndexSpaceID d)
public final ISBounds map(ISBounds bounds)
map
in class ISPartitioning
public final long containingOffset(IndexSpaceID id)
public final long elementOffset(IndexSpaceID id)
public ISBounds getGeometricBounds()
public long volume()
public long partitionVolume()
public ISBounds mapToSpace(ISBounds partitionBounds)
public ISBounds mapToSpace(IndexSpaceID partitionID)
public final int getPartitionBoundary(IndexSpaceID partitionID, int axis, boolean upper)
public final int getContainingPartitionBoundary(IndexSpaceID id, int axis, boolean upper)
public final ISBounds getContainingPartitionBounds(IndexSpaceID id)
public final ISBounds getContainingPartitionBounds(IndexSpaceID id, ISBounds bounds)
public ISBoundsIterator getPartitionIterator(ISBounds subSpace)
getPartitionIterator
in class ISPartitioning
public ISBoundsIterator getPartitionIterator(ISBounds subSpace, ISBoundsIterator iter)
public ISBounds getIndexedBounds(ISBounds bounds, IndexSpaceID partitioningIndex)
getIndexedBounds
in class ISPartitioning
public ISBounds getOffsetBounds(ISBounds bounds, long offset)
public IndexSpaceID getOffsetID(long offset)
public IndexSpaceID getOffsetID(IndexSpaceID id, long offset)
public final long partitionOffset(IndexSpaceID id)
public java.lang.String toString()
toString
in class ISPartitioning
public java.lang.String toString(java.lang.String indent)
toString
in class ISPartitioning
public static void main(java.lang.String argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |