public abstract class ObjectFeatureFloat extends ObjectFeature implements BinarySerializable, ObjectVector<java.lang.Float>
LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
Modifier and Type | Field and Description |
---|---|
protected float[] |
data |
ori, scl, x, y
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Modifier | Constructor and Description |
---|---|
protected |
ObjectFeatureFloat(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of ObjectFeatureType loaded from binary input buffer.
|
|
ObjectFeatureFloat(java.io.BufferedReader stream)
Creates a new instance of Object from stream.
|
|
ObjectFeatureFloat(float x,
float y,
float ori,
float scl,
float[] data)
Creates a new instance of object
|
|
ObjectFeatureFloat(float x,
float y,
float ori,
float scl,
int dimension)
Creates a new instance of randomly generated object
|
Modifier and Type | Method and Description |
---|---|
int |
binarySerialize(BinaryOutput output,
BinarySerializator serializator)
Binary-serialize this object into the
output . |
boolean |
dataEquals(java.lang.Object obj)
Indicates whether some other object has the same data as this one.
|
int |
dataHashCode()
Returns a hash code value for the data of this object.
|
int |
getBinarySize(BinarySerializator serializator)
Returns the exact size of the binary-serialized version of this object in bytes.
|
int |
getDimensionality()
Returns number of dimensions of this vector.
|
int |
getSize()
Returns the size of object in bytes
|
float[] |
getVectorData()
Returns the vector of integers, which represents the contents of this object.
|
int |
getVectorDataDimension()
Number of dimensions of the vector data.
|
java.lang.Float |
getVectorDataItem(int index)
Access to a single datum of vector data at the given zero-based index.
|
java.lang.String |
toString()
toString
Converts the object to a string representation.
|
void |
writeData(java.io.OutputStream stream)
Write object to stream
|
cloneRandomlyModify, getOrientation, getScale, getX, getY, setOri, setScl, setX, setY
clearSurplusData, clone, clone, create, create, createMetaDistancesHolder, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceImpl, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceUpperBound, getDistanceUpperBoundImpl, getFieldsForNames, getMaxDistance, getNormDistance, getPrecomputedDistance, getPrecomputedDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, isDistanceCompatible, parseObjectComment, peekNextChar, readAttributesFromStream, readObjectComments, readObjectCommentsWithoutData, unchainFilter, write, write, writeAttributesToStream, writeObjectComment
clone, getLocatorURI, getNoDataObject, getObjectKey, getObjectKey, getObjectLocatorURI, setObjectKey
public ObjectFeatureFloat(float x, float y, float ori, float scl, float[] data)
public ObjectFeatureFloat(float x, float y, float ori, float scl, int dimension)
public ObjectFeatureFloat(java.io.BufferedReader stream) throws java.io.IOException, java.lang.NumberFormatException
java.io.IOException
java.lang.NumberFormatException
protected ObjectFeatureFloat(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
input
- the buffer to read the ObjectFeatureByte fromserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error reading from the bufferpublic float[] getVectorData()
public java.lang.Float getVectorDataItem(int index)
ObjectVector
getVectorDataItem
in interface ObjectVector<java.lang.Float>
index
- zero-base index of the datum to returnpublic int getVectorDataDimension()
ObjectVector
getVectorDataDimension
in interface ObjectVector<java.lang.Float>
public void writeData(java.io.OutputStream stream) throws java.io.IOException
writeData
in class ObjectFeature
stream
- the stream to store this object tojava.io.IOException
- if there was an error while writing to streampublic java.lang.String toString()
super.toString()
is appended.toString
in class AbstractObject
public boolean dataEquals(java.lang.Object obj)
LocalAbstractObject
dataEquals
in class ObjectFeature
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.public int dataHashCode()
LocalAbstractObject
dataHashCode
in class ObjectFeature
public int getSize()
getSize
in class ObjectFeature
public int getDimensionality()
public int binarySerialize(BinaryOutput output, BinarySerializator serializator) throws java.io.IOException
LocalAbstractObject
output
.binarySerialize
in interface BinarySerializable
binarySerialize
in class ObjectFeature
output
- the output that this object is binary-serialized intoserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error during serializationpublic int getBinarySize(BinarySerializator serializator)
LocalAbstractObject
getBinarySize
in interface BinarySerializable
getBinarySize
in class ObjectFeature
serializator
- the serializator used to write objects