|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.unh.sdb.datasource.DataCollection
edu.unh.sdb.datasource.DataBlock
edu.unh.sdb.datasource.ObliquePlaneIterator
public class ObliquePlaneIterator
Nested Class Summary | |
---|---|
protected class |
ObliquePlaneIterator.IOThread
|
Fields inherited from class edu.unh.sdb.datasource.DataCollection |
---|
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc |
Constructor Summary | |
---|---|
ObliquePlaneIterator(IndexSpaceID planeShape,
IndexSpaceID startpoint,
float[] normal,
int numsteps,
boolean threaded,
DataSource source)
Construct an ObliquePlaneIterator that represents data using a datablock with shape specified by the first argument. |
|
ObliquePlaneIterator(IndexSpaceID planeShape,
IndexSpaceID startpoint,
float[] normal,
int numsteps,
DataSource source)
Construct an ObliquePlaneIterator that represents data using a datablock with shape specified by the first argument. |
Method Summary | |
---|---|
protected static int |
chooseProjectionAxis(float[] vector)
Return the axis along which the iterator will project the plane. |
protected ISBoundsIterator |
createPrefetchIterator(ISBounds planeBounds,
ISBounds iterationSpace,
IndexSpaceID blockDimensions)
|
void |
datum(Datum dtm,
IndexSpaceID did)
Return by reference the Datum corresponding to the given IndexSpaceID. |
void |
datum(Datum dtm,
IndexSpaceID did,
FieldIDMapper mp)
Get the Datum and fill its values in the passed Datum at positions specified by the corresponding FieldIDMapper. |
void |
datum(Datum dtm,
IndexSpaceID did,
RecordSpec recSpec)
Get the Datum and fill its values in the passed Datum at positions specified by the corresponding RecordSpec. |
void |
datum(Datum d,
int[] coordArray)
Given an array of coordinates, copy the corresponding datum into the first parameter. |
Datum |
datum(IndexSpaceID did)
Given an IndexSpaceID, return the corresponding datum. |
Datum |
datum(IndexSpaceID did,
RecordSpec spec)
Given an IndexSpaceID, return the corresponding datum with attributes specified in the RecordSpec. |
void |
deactivate()
|
void |
end()
Advance the iterator to the last valid value in the iteration. |
protected void |
fetch(double[] centerPoint,
ISBoundsIterator planeIterator,
boolean fetchCurrent,
boolean fetchNext)
This method assumes that the underlying datasource is a MultiBlockCache. |
protected void |
fetchCurrent(int step)
This method assumes that the underlying datasource is a MultiBlockCache. |
protected void |
fetchCurrentandNext(int step)
This method assumes that the underlying datasource is a MultiBlockCache. |
protected void |
fetchNext(int step)
This method assumes that the underlying datasource is a MultiBlockCache. |
protected void |
fetchWorks(double[] centerPoint,
ISBoundsIterator planeIterator,
boolean fetchCurrent,
boolean fetchNext)
This method assumes that the underlying datasource is a MultiBlockCache. |
protected void |
fillBlock(boolean initial)
This method fills the plane block with data read. |
protected static int |
findMax(float[] vector)
Return the index of the element with maximum magnitude |
float[] |
getCenterPoint()
Return the current center point of the plane in space. |
float[] |
getCenterPoint(float[] point)
Return the current center point of the plane in space. |
DataSource |
getDataSource()
Return the datasource being iterated over. |
float[] |
getNormalArray()
Return a copy of the normals array. |
IndexSpaceID[] |
getPlane3DVertices(IndexSpaceID[] vertices)
|
int[] |
getPlaneShapeArray()
Return an array indicating the 2D shape of the iteration plane. |
int |
getPlaneVolume()
Return the volume of the iteration plane. |
float[] |
getProjectedNormalArray()
Return a projection of the normals array onto the projection Axis. |
int |
getProjectionAxis()
Return the axis along which the iterator will project the plane. |
ISBounds |
getSpaceBounds()
Returns an ISBounds representing the dimensions of the space being iterated over. |
int[] |
getSpaceShapeArray()
Returns an array of ints representing the dimensions of the space being iterated over. |
Values |
getValues()
return the Values (data) stored in this basicBlock |
void |
init()
Perform any necessary initialization, and set the iterator value to the first value in the iteration. |
boolean |
next()
Advance the iterator by one step. |
static void |
reduceByCoord(float[] vector,
int axis)
Divide all elements of the vector by the absolute value of the coordinate at the specified axis. |
protected void |
removePrefetchThread()
|
void |
setDataSource(DataSource source)
Set the datasource being iterated over. |
void |
setDatum(IndexSpaceID isid,
Datum d)
Set the location specified by the IndexSpaceID to the given datum. |
static void |
setEffectiveZeros(float[] normal,
int numSteps)
Any component of the normal that is sufficiently small will be set to zero. |
protected void |
setFetchPlane(ISBoundsIterator planeIterator,
double[] point,
int step)
Set the iteration space of the 2D plane iterator to correspond to the given 3D iteration step. |
void |
setSPCacheBlocks(boolean spBlockShape)
Indicate to this iterator whether the underlying cache has blocks shaped according to the plane normal. |
int |
size()
Deprecated. Use volume() |
void |
subblock(DataBlock theBlock,
ISBounds dstBounds,
ISBounds srcBounds)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
void |
subblock(DataBlock theBlock,
ISBounds dstBounds,
ISBounds srcBounds,
FieldIDMapper mp)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
void |
subblock(DataBlock theBlock,
ISBounds dstBounds,
ISBounds srcBounds,
RecordSpec spec)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
DataBlock |
subblock(ISBounds db)
Return a new DataBlock that is a subset of this datablock. |
java.lang.String |
toString()
Write the values of the entire DataBlock index space to a string in a nice format. |
boolean |
valid()
Return true if the iterator currently has a valid value, false otherwise. |
int |
volume()
Return the number of elements in the datablock. |
Methods inherited from class edu.unh.sdb.datasource.DataBlock |
---|
setByAttribute, setByte, setBytes, setBytes, setBytesByAttribute, setBytesByPoint, setDouble, setDoubles, setDoubles, setDoublesByAttribute, setDoublesByPoint, setFloat, setFloats, setFloats, setFloatsByAttribute, setFloatsByPoint, setInt, setInts, setInts, setIntsByAttribute, setIntsByPoint, setShort, setShorts, setShorts, setShortsByAttribute, setShortsByPoint, setValues, setValues, setValuesByAttribute, setValuesByPoint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected BasicBlock theBlock
protected DataSource theSource
protected int spaceDimensionality
protected int currentStep
protected int numSteps
protected boolean valid
protected double[] currentPoint
protected double[] startPoint
protected double[] prefetchPoint
protected float[] normal
protected double[] shiftTotals
protected int projectionAxis
protected ISIterator planeIterator
protected ISBounds planeBounds
protected ISBounds startBounds
protected ISBoundsIterator fetchIterator
protected ISBounds fetchBounds
protected int[] blockDimensionsArray
protected edu.unh.sdb.datasource.ObliquePlaneIterator.PlaneMapper planemapper
protected int plane0
protected int plane1
protected RegularISPartitioning planePartitioning
protected ISBounds dilatedFetchBounds
protected IntegerIndexSpaceID spaceLocation
protected IntegerIndexSpaceID mainSpaceLocation
protected IntegerIndexSpaceID blockLocation
protected IntegerIndexSpaceID block_plane_offset
protected IndexSpaceID scratchID2D
protected IndexSpaceID mainScratchID2D
protected IndexSpaceID scratchID3D
protected double[] absNormal
protected int[] normalSigns
protected int[] shiftDirections
protected int prefetchInterval
protected boolean threaded
protected ObliquePlaneIterator.IOThread prefetchThread
protected int[] sQBLowerInts
protected int[] sQBUpperInts
protected int[] datumCoords1
protected ISBounds sourceQueryBounds
protected edu.unh.sdb.datasource.CacheContext mainCacheContext
protected RegularISPartitioning cachePartitioning
protected Datum datum
protected DSBlockStencil stencil
protected IndexSpaceID externalScratchID
protected boolean SPBlockShape
protected boolean stoppedPrefetching
Constructor Detail |
---|
public ObliquePlaneIterator(IndexSpaceID planeShape, IndexSpaceID startpoint, float[] normal, int numsteps, DataSource source)
public ObliquePlaneIterator(IndexSpaceID planeShape, IndexSpaceID startpoint, float[] normal, int numsteps, boolean threaded, DataSource source)
Method Detail |
---|
public static void setEffectiveZeros(float[] normal, int numSteps)
public void init()
init
in interface SDBIterator
public boolean next()
next
in interface SDBIterator
public boolean valid()
valid
in interface SDBIterator
public void end()
end
in interface SDBIterator
protected void fetch(double[] centerPoint, ISBoundsIterator planeIterator, boolean fetchCurrent, boolean fetchNext)
protected void fetchWorks(double[] centerPoint, ISBoundsIterator planeIterator, boolean fetchCurrent, boolean fetchNext)
protected void fetchNext(int step)
protected void fetchCurrent(int step)
protected void fetchCurrentandNext(int step)
protected ISBoundsIterator createPrefetchIterator(ISBounds planeBounds, ISBounds iterationSpace, IndexSpaceID blockDimensions)
protected void setFetchPlane(ISBoundsIterator planeIterator, double[] point, int step)
protected void fillBlock(boolean initial)
protected void removePrefetchThread()
public void deactivate()
protected static int findMax(float[] vector)
protected static int chooseProjectionAxis(float[] vector)
public int getProjectionAxis()
public static void reduceByCoord(float[] vector, int axis)
public DataSource getDataSource()
getDataSource
in interface ObliquePlaneIteratorInterface
public void setSPCacheBlocks(boolean spBlockShape)
setSPCacheBlocks
in interface ObliquePlaneIteratorInterface
public void setDataSource(DataSource source)
setDataSource
in interface ObliquePlaneIteratorInterface
public float[] getNormalArray()
getNormalArray
in interface ObliquePlaneIteratorInterface
public float[] getProjectedNormalArray()
public int[] getPlaneShapeArray()
getPlaneShapeArray
in interface ObliquePlaneIteratorInterface
public int getPlaneVolume()
public IndexSpaceID[] getPlane3DVertices(IndexSpaceID[] vertices)
public final ISBounds getSpaceBounds()
getSpaceBounds
in interface ObliquePlaneIteratorInterface
public final int[] getSpaceShapeArray()
getSpaceShapeArray
in interface ObliquePlaneIteratorInterface
public final float[] getCenterPoint()
public final float[] getCenterPoint(float[] point)
public int size()
size
in class DataCollection
public int volume()
volume
in class DataCollection
public Datum datum(IndexSpaceID did)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum d, int[] coordArray)
datum
in class DataCollection
public Datum datum(IndexSpaceID did, RecordSpec spec)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum dtm, IndexSpaceID did, RecordSpec recSpec)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum dtm, IndexSpaceID did, FieldIDMapper mp)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum dtm, IndexSpaceID did)
datum
in interface Indexable
datum
in class DataCollection
public void setDatum(IndexSpaceID isid, Datum d)
setDatum
in class DataBlock
public DataBlock subblock(ISBounds db)
subblock
in interface Indexable
subblock
in class DataCollection
public void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds)
subblock
in interface Indexable
subblock
in class DataCollection
public void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds, FieldIDMapper mp)
subblock
in interface Indexable
subblock
in class DataCollection
public Values getValues()
getValues
in class DataBlock
public void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds, RecordSpec spec)
subblock
in interface Indexable
subblock
in class DataCollection
public java.lang.String toString()
DataBlock
toString
in class DataBlock
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |