|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.unh.sdb.datasource.DSStencil
edu.unh.sdb.datasource.DSPartitionedStencil
edu.unh.sdb.datasource.DSListStencil
public class DSListStencil
This is an implementation of a partitioned stencil that uses a list of ISIDs to maintain the record of active elements. As a result, the set and get methods are O(n), but iteration is efficient, and less memory is used than with the array implementation. However, it taxes the garbage collector by creating and destroying lots of IndexSpaceIDs, so it may not be so suitable for repeated use.
Field Summary | |
---|---|
protected java.util.ArrayList<IndexSpaceID> |
partitionList
|
Fields inherited from class edu.unh.sdb.datasource.DSPartitionedStencil |
---|
headerLength, partitioning, partitioningDimensionsArray, partitionListBytesLength |
Fields inherited from class edu.unh.sdb.datasource.DSStencil |
---|
dimensionality, space |
Constructor Summary | |
---|---|
DSListStencil(RegularISPartitioning partitioning)
Construct a stencil that identifies areas of interest using a partitioning. |
Method Summary | |
---|---|
void |
clear()
Clear this stencil of all elements. |
boolean |
get(IndexSpaceID id)
Return true if the given id maps to an active stencil element, false otherwise. |
ISBounds |
getIndexedBounds(ISBounds stencilBounds,
int index)
Set the given ISBounds to a shape equal to the indexed stencil element. |
protected long |
getIndexedOffset(int index)
Return the partition offset corresponding to the given index. |
static void |
main(java.lang.String[] argv)
|
boolean |
set(IndexSpaceID id)
Set the stencil element containing the id to "active". |
boolean |
setElement(IndexSpaceID pid)
Set the stencil element with index corresponding to id to "active. |
protected void |
setElementFromOffset(int offset)
Set the element corresponding to the 1D offset to be active. |
int |
size()
return number of element contained by this stencil |
Methods inherited from class edu.unh.sdb.datasource.DSPartitionedStencil |
---|
chooseBytesPerValue, getPartitionDimensions, getPartitionDimensionsArray, getPartitioningDimensions, getPartitionListBytes, getPartitionListBytesLength, inPartitioningBounds, inPartitioningBounds, partitionVolume, setPartitionListFromBytes, toString, toString, volume |
Methods inherited from class edu.unh.sdb.datasource.DSStencil |
---|
dim, getIndexedBounds, getSpaceBounds |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList<IndexSpaceID> partitionList
Constructor Detail |
---|
public DSListStencil(RegularISPartitioning partitioning)
Method Detail |
---|
public boolean set(IndexSpaceID id)
set
in class DSStencil
public boolean setElement(IndexSpaceID pid)
setElement
in class DSStencil
public boolean get(IndexSpaceID id)
get
in class DSStencil
protected void setElementFromOffset(int offset)
setElementFromOffset
in class DSPartitionedStencil
protected long getIndexedOffset(int index)
getIndexedOffset
in class DSPartitionedStencil
public ISBounds getIndexedBounds(ISBounds stencilBounds, int index)
getIndexedBounds
in class DSStencil
public int size()
size
in class DSStencil
public void clear()
clear
in class DSPartitionedStencil
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |