public abstract class ObjectIntSortedVector extends ObjectIntVector
LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
data
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Modifier | Constructor and Description |
---|---|
protected |
ObjectIntSortedVector(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of ObjectIntSortedVector loaded from binary input buffer - it gotta be sorted already.
|
|
ObjectIntSortedVector(java.io.BufferedReader stream)
Creates a new instance of Object from text stream - it expects that the data is already sorted!
|
|
ObjectIntSortedVector(int dimension)
Creates a new instance of randomly generated object
|
|
ObjectIntSortedVector(int[] data)
Creates a new instance of object - make sure the data is sorted
|
|
ObjectIntSortedVector(int[] data,
boolean forceSort)
Creates a new instance of object - make sure the data is sorted
|
Modifier and Type | Method and Description |
---|---|
LocalAbstractObject |
cloneRandomlyModify(java.lang.Object... args)
Creates and returns a randomly modified copy of this vector.
|
protected int[] |
getMinMaxOverCoords(int[] currRange)
Computes minimum and maximum values over all coordinates of the current vector.
|
protected void |
sortData()
Sort the internal array with data.
|
binarySerialize, dataEquals, dataHashCode, getBinarySize, getDimensionality, getMinMaxForEveryCoord, getMinMaxOverCoords, getSize, getVectorData, getVectorDataDimension, getVectorDataItem, getVectorDataItemInt, parseIntVector, randomData, toString, writeData, writeIntVector
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 ObjectIntSortedVector(int[] data, boolean forceSort)
data
- int vector dataforceSort
- if false, the data is expected to be sortedpublic ObjectIntSortedVector(int[] data)
data
- int vector datapublic ObjectIntSortedVector(int dimension)
dimension
- vector dimensionalitypublic ObjectIntSortedVector(java.io.BufferedReader stream) throws java.io.IOException, java.lang.NumberFormatException
stream
- text stream to read the data fromjava.io.IOException
- when an error appears during reading from given stream.
or EOFException when end-of-file of the given stream is reached.java.lang.NumberFormatException
- when the line read from given stream does
not consist of comma-separated or space-separated numbers.protected ObjectIntSortedVector(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
input
- the buffer to read the ObjectIntVector fromserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error reading from the bufferprotected void sortData()
protected int[] getMinMaxOverCoords(int[] currRange)
getMinMaxOverCoords
in class ObjectIntVector
currRange
- An optional parameter containing current minimum and maximum values. If null is passed
a new range with minimum and maximum is created, otherwise the passed array is updated.public LocalAbstractObject cloneRandomlyModify(java.lang.Object... args) throws java.lang.CloneNotSupportedException
cloneRandomlyModify
in class ObjectIntVector
args
- expected size of the array is 2: minVector vector with minimal values in all positions
maxVector vector with maximal values in all positionsjava.lang.CloneNotSupportedException
- if the object's class does not support cloning or there was an error