|
|||||||||
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.BasicBlock
public class BasicBlock
Field Summary | |
---|---|
protected int |
leastSignificantAxis
|
protected int[] |
steps
|
Fields inherited from class edu.unh.sdb.datasource.DataCollection |
---|
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc |
Constructor Summary | |
---|---|
BasicBlock(ISBounds isb,
RecordDescriptor recordDesc)
Construct a datablock with the given bounds and number of attributes. |
|
BasicBlock(ISBounds isb,
RecordDescriptor recordDesc,
AxisOrdering ordering)
Construct a datablock with the given bounds and axisordering. |
|
BasicBlock(ISBounds isb,
RecordDescriptor recordDesc,
Values data)
Construct a BasicBlock with the given data and ISBounds. |
Method Summary | |
---|---|
protected void |
copyData(int srcOffset,
int dstOffset,
int rodDataSize)
|
protected void |
copyData(int srcOffset,
int dstOffset,
int[] rsMapping)
|
protected void |
copyData(int srcOffset,
int dstOffset,
int[] componentFields,
int[] compositeFields)
|
void |
datum(ByteDatum datum,
int[] coords)
Given an array of coordinates, load the corresponding datum into the datum argument. |
void |
datum(Datum datum,
IndexSpaceID did)
Given IndexSpaceID, load the corresponding datum into the datum argument. |
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 datum,
int[] coords)
Given an array of coordinates, load the corresponding datum into the datum argument. |
Datum |
datum(IndexSpaceID did)
Given an IndexSpaceID, return the corresponding datum.( this only works for float implementation ) |
Datum |
datum(IndexSpaceID did,
RecordSpec spec)
Given an IndexSpaceID, return the corresponding datum with attributes specified in the RecordSpec. |
void |
datum(ShortDatum datum,
int[] coords)
Given an array of coordinates, load the corresponding datum into the datum argument. |
byte |
getByte(IndexSpaceID did,
int fieldNumber)
get the field value at the ISID position as a short. |
double |
getDouble(IndexSpaceID did,
int fieldNumber)
get the field value at the ISID position as an int. |
void |
getDoubles(double[] dstArray,
RecordSpec recordSpec,
boolean pointOrder)
User passes in a pre-allocated double array, attributes specified by recordSpec are copied from the BasicBlock to the dstArray. |
protected int |
getFieldPos(int oneDIndex,
int fieldNumber)
|
float |
getFloat(IndexSpaceID did,
int fieldNumber)
get the float attribute for a given IndexSpaceID and attributeID, convert if needed |
void |
getFloats(float[] dstArray,
RecordSpec recordSpec,
boolean pointOrder)
User passes in a pre-allocated float array, attributes specified by recordSpec are copied from the BasicBlock to the dstArray. |
int |
getInt(IndexSpaceID did,
int fieldNumber)
get the field value at the ISID position as an int. |
void |
getInts(int[] dstArray,
RecordSpec recordSpec,
boolean pointOrder)
User passes in a pre-allocated int array, attributes specified by recordSpec are copied from the BasicBlock to the dstArray. |
short |
getShort(IndexSpaceID did,
int fieldNumber)
get the field value at the ISID position as a short. |
void |
getShorts(short[] dstArray,
RecordSpec recordSpec,
boolean pointOrder)
User passes in a pre-allocated short array, attributes specified by recordSpec are copied from the BasicBlock to the dstArray. |
Values |
getValues()
return the Values (data) store in this basicBlock |
Values |
getValues(int attr)
return a Values array consisting of the data for the specified attribute. |
void |
psubblock(DataBlock dstBlock,
ISBounds dstBounds,
ISBounds srcBounds)
this subblock does not check the bounds |
protected void |
setAttributeOrderRod(java.nio.ByteBuffer byteBuffer,
int rodSize,
int startDatumArrayOffset,
int datumArrayStep,
int dstAttributeID,
int attributeByteSize,
int sourcetype)
given a rod of data of one attribute, copy the spedified attribute into the corresponding location in the BasicBlock , used for attribute order binaryFiledataSoure |
void |
setBytes(int attr,
byte[] newValues)
Assign attribute values for all points in the block |
void |
setDatum(IndexSpaceID isid,
Datum d)
Set the location specified by the IndexSpaceID to the given datum. |
void |
setDoubles(int attr,
double[] newValues)
Assign attribute values for all points in the block |
void |
setField(int index,
byte byteData,
int fieldID)
set a byte field value at certain index( index of conceptual datum for an one D array ) |
void |
setField(int index,
double doubleData,
int fieldID)
set a double field value at certain index( index of conceptual datum for an one D array ) |
void |
setField(int fieldIndex,
float floatData)
set a field value, the index is the index of the field in this 1D array |
void |
setField(int index,
float floatData,
int fieldID)
set a float field value at certain index( index of conceptual datum for an one D array ) |
void |
setField(int index,
int intData,
int fieldID)
set a int field value at certain index( index of conceptual datum for an one D array ) |
void |
setField(int index,
short shortData,
int fieldID)
set a short field value at certain index( index of conceptual datum for an one D array ) |
void |
setFloats(float[] newVals)
set the entire attribute array block to the passed argument. |
void |
setFloats(int attr,
float[] newValues)
Assign attribute values for all points in the block |
void |
setInts(int attr,
int[] newValues)
Assign attribute values for all points in the block |
protected void |
setRod(java.nio.ByteBuffer byteBuffer,
int rodSize,
int startDatumArrayOffset,
int datumArrayStep,
FieldIDMapper mp,
RecordDescriptor sourceRecordDesc)
given a rod of data ( byte buffer), copy the specified field into the corresponding location in the BasicBlock, dstBlock is considered as compositeBlock, the srcBlock is the componentBlock |
protected void |
setRod(java.nio.ByteBuffer byteBuffer,
int rodSize,
int startDatumArrayOffset,
int datumArrayStep,
RecordSpec recSpec,
RecordDescriptor sourceRecordDesc)
given a rod of data ( byte buffer), copy the specified field in corresponding location in the BasicBlock, dstBlock is considered as composite , the srcBlock is the component |
void |
setShorts(int attr,
short[] newValues)
Assign attribute values for all points in the block |
void |
setValues(int attr,
Values newValues)
Assign attribute values for all points in the block |
boolean |
setValues(Values vals)
Set all values at once. |
protected void |
subblock(BasicBlock dstBlock,
ISBounds inDestBounds,
ISBounds srcBounds)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
protected void |
subblock(BasicBlock dstBlock,
ISBounds inDestBounds,
ISBounds srcBounds,
RecordSpec rs,
FieldIDMapper fim)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
void |
subblock(DataBlock dstBlock,
ISBounds dstBounds,
ISBounds srcBounds)
this is the old interface, the query bounds is check to ensure correctness |
void |
subblock(DataBlock dstBlock,
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 dstBlock,
ISBounds dstBounds,
ISBounds srcBounds,
RecordSpec spec)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. |
Methods inherited from class edu.unh.sdb.datasource.DataBlock |
---|
setByAttribute, setByte, setBytes, setBytesByAttribute, setBytesByPoint, setDouble, setDoubles, setDoublesByAttribute, setDoublesByPoint, setFloat, setFloats, setFloatsByAttribute, setFloatsByPoint, setInt, setInts, setIntsByAttribute, setIntsByPoint, setShort, setShorts, setShortsByAttribute, setShortsByPoint, setValuesByAttribute, setValuesByPoint, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int leastSignificantAxis
protected int[] steps
Constructor Detail |
---|
public BasicBlock(ISBounds isb, RecordDescriptor recordDesc, Values data)
public BasicBlock(ISBounds isb, RecordDescriptor recordDesc)
public BasicBlock(ISBounds isb, RecordDescriptor recordDesc, AxisOrdering ordering)
Method Detail |
---|
protected final int getFieldPos(int oneDIndex, int fieldNumber)
public Values getValues()
getValues
in class DataBlock
public Values getValues(int attr)
getValues
in class DataCollection
public final void setField(int index, int intData, int fieldID)
public final void setField(int index, double doubleData, int fieldID)
public final void setField(int index, short shortData, int fieldID)
public final void setField(int index, byte byteData, int fieldID)
public final void setField(int index, float floatData, int fieldID)
public void setField(int fieldIndex, float floatData)
public float getFloat(IndexSpaceID did, int fieldNumber)
getFloat
in class DataCollection
public double getDouble(IndexSpaceID did, int fieldNumber)
getDouble
in class DataCollection
public int getInt(IndexSpaceID did, int fieldNumber)
getInt
in class DataCollection
public short getShort(IndexSpaceID did, int fieldNumber)
getShort
in class DataCollection
public byte getByte(IndexSpaceID did, int fieldNumber)
getByte
in class DataCollection
public void getFloats(float[] dstArray, RecordSpec recordSpec, boolean pointOrder)
public void getInts(int[] dstArray, RecordSpec recordSpec, boolean pointOrder)
public void getShorts(short[] dstArray, RecordSpec recordSpec, boolean pointOrder)
public void getDoubles(double[] dstArray, RecordSpec recordSpec, boolean pointOrder)
public boolean setValues(Values vals)
setValues
in class DataBlock
public void setFloats(float[] newVals)
public void setDoubles(int attr, double[] newValues)
setDoubles
in class DataBlock
public void setFloats(int attr, float[] newValues)
setFloats
in class DataBlock
public void setInts(int attr, int[] newValues)
setInts
in class DataBlock
public void setShorts(int attr, short[] newValues)
setShorts
in class DataBlock
public void setBytes(int attr, byte[] newValues)
setBytes
in class DataBlock
public void setValues(int attr, Values newValues)
setValues
in class DataBlock
public Datum datum(IndexSpaceID did)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum datum, IndexSpaceID did)
datum
in interface Indexable
datum
in class DataCollection
public void datum(Datum datum, int[] coords)
datum
in class DataCollection
public void datum(ShortDatum datum, int[] coords)
public void datum(ByteDatum datum, int[] coords)
public Datum datum(IndexSpaceID did, RecordSpec spec)
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, RecordSpec recSpec)
datum
in interface Indexable
datum
in class DataCollection
public void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds)
subblock
in interface Indexable
subblock
in class DataCollection
public void psubblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds)
protected void subblock(BasicBlock dstBlock, ISBounds inDestBounds, ISBounds srcBounds)
protected void subblock(BasicBlock dstBlock, ISBounds inDestBounds, ISBounds srcBounds, RecordSpec rs, FieldIDMapper fim)
protected void copyData(int srcOffset, int dstOffset, int[] componentFields, int[] compositeFields)
protected void copyData(int srcOffset, int dstOffset, int[] rsMapping)
protected void copyData(int srcOffset, int dstOffset, int rodDataSize)
public void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds, FieldIDMapper mp)
subblock
in interface Indexable
subblock
in class DataCollection
public void subblock(DataBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds, RecordSpec spec)
subblock
in interface Indexable
subblock
in class DataCollection
public void setDatum(IndexSpaceID isid, Datum d)
setDatum
in class DataBlock
protected void setRod(java.nio.ByteBuffer byteBuffer, int rodSize, int startDatumArrayOffset, int datumArrayStep, FieldIDMapper mp, RecordDescriptor sourceRecordDesc)
protected void setAttributeOrderRod(java.nio.ByteBuffer byteBuffer, int rodSize, int startDatumArrayOffset, int datumArrayStep, int dstAttributeID, int attributeByteSize, int sourcetype)
protected void setRod(java.nio.ByteBuffer byteBuffer, int rodSize, int startDatumArrayOffset, int datumArrayStep, RecordSpec recSpec, RecordDescriptor sourceRecordDesc)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |