|
|||||||||
| 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 DSStencilpublic boolean setElement(IndexSpaceID pid)
setElement in class DSStencilpublic boolean get(IndexSpaceID id)
get in class DSStencilprotected void setElementFromOffset(int offset)
setElementFromOffset in class DSPartitionedStencilprotected long getIndexedOffset(int index)
getIndexedOffset in class DSPartitionedStencil
public ISBounds getIndexedBounds(ISBounds stencilBounds,
int index)
getIndexedBounds in class DSStencilpublic int size()
size in class DSStencilpublic void clear()
clear in class DSPartitionedStencilpublic static void main(java.lang.String[] argv)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||