public class ObjectIntSortedVectorJaccard extends ObjectIntSortedVector implements java.io.Serializable
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 |
ObjectIntSortedVectorJaccard(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of ObjectIntSortedVector loaded from binary input buffer - it gotta be sorted already.
|
|
ObjectIntSortedVectorJaccard(java.io.BufferedReader stream)
Creates a new instance of Object from stream - force sort of the data
|
|
ObjectIntSortedVectorJaccard(int dimension)
Creates a new instance of randomly generated object
|
|
ObjectIntSortedVectorJaccard(int[] data)
Creates a new instance of object - make sure the data is sorted
|
|
ObjectIntSortedVectorJaccard(int[] data,
boolean forceSort)
Creates a new instance of object - make sure the data is sorted
|
Modifier and Type | Method and Description |
---|---|
protected float |
getDistanceImpl(LocalAbstractObject obj,
float distThreshold)
Implements the Jaccard coeficient distance function.
|
cloneRandomlyModify, getMinMaxOverCoords, sortData
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, 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 ObjectIntSortedVectorJaccard(int[] data, boolean forceSort)
data
- int vector dataforceSort
- if false, the data is expected to be sortedpublic ObjectIntSortedVectorJaccard(int[] data)
data
- int vector datapublic ObjectIntSortedVectorJaccard(int dimension)
dimension
- vector dimensionalitypublic ObjectIntSortedVectorJaccard(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 eof 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 ObjectIntSortedVectorJaccard(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 float getDistanceImpl(LocalAbstractObject obj, float distThreshold)
getDistanceImpl
in class LocalAbstractObject
obj
- distThreshold
-