public class RangeQueryOperation extends RankingSingleQueryOperation
QueryOperation.DataEqualOperation
AbstractOperation.OperationConstructor, AbstractOperation.OperationName
Modifier and Type | Field and Description |
---|---|
protected float |
radius
Range query radius
|
suppData, uuidOperationComparator
Constructor and Description |
---|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius)
Creates a new instance of RangeQueryOperation for a given query object and radius.
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType)
Creates a new instance of RangeQueryOperation for a given query object and radius.
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType,
boolean storeMetaDistances)
Creates a new instance of RangeQueryOperation for a given query object and radius.
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType,
int maxAnswerSize)
Creates a new instance of RangeQueryOperation for a given query object, radius and maximal number of objects to return.
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType,
int maxAnswerSize,
boolean storeMetaDistances)
Creates a new instance of RangeQueryOperation for a given query object, radius and maximal number of objects to return.
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType,
int maxAnswerSize,
boolean storeMetaDistances,
RankedSortedCollection answerCollection)
Creates a new instance of RangeQueryOperation for a given query object, radius and maximal number of objects to return.
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
boolean storeMetaDistances)
Creates a new instance of RangeQueryOperation for a given query object and radius.
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
int maxAnswerSize)
Creates a new instance of RangeQueryOperation for a given query object, radius and maximal number of objects to return.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
dataEqualsImpl(QueryOperation obj)
Indicates whether some other operation has the same data as this one.
|
int |
dataHashCode()
Returns a hash code value for the data of this operation.
|
int |
evaluate(AbstractObjectIterator<? extends LocalAbstractObject> objects)
Evaluate this query on a given set of objects.
|
float |
getAnswerThreshold()
Returns the threshold distance for the current answer of this query.
|
java.lang.Object |
getArgument(int index)
Returns argument that was passed while constructing instance.
|
int |
getArgumentCount()
Returns number of arguments that were passed while constructing this instance.
|
float |
getRadius()
Returns the radius of this range query.
|
addToAnswer, addToAnswer, clearSurplusData, clone, createOperation, getQueryObject, isStoringMetaDistances
addToAnswer, endOperation, getAnswer, getAnswer, getAnswerClass, getAnswerCollectionClass, getAnswerCollectionClone, getAnswerComparator, getAnswerCount, getAnswerDistance, getAnswerDistanceRestricted, getAnswerDistanceRestricted, getAnswerMaximalCapacity, getAnswerObjects, getLastAnswer, getSubAnswer, getSubAnswer, getSubAnswerCount, isAnswerFull, resetAnswer, setAnswerCollection, setAnswerIgnoringDuplicates, setAnswerThresholdComputation, setAnswerThresholdComputation, updateFrom, updateFrom
appendErrorCode, clone, dataEquals, endOperation, getAllSubAnswers, getAnswerType, getQueryAnswer, iterator, setAnswerType, wasSuccessful
appendArguments, containsParameter, createOperation, equals, getAnnotatedConstructor, getAnnotatedConstructor, getArgumentString, getConstructorArgumentDescriptions, getConstructorArgumentDescriptions, getConstructorArguments, getConstructorArguments, getConstructorDescription, getErrorCode, getName, getName, getOperationID, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, hashCode, isErrorCode, isFinished, removeParameter, setParameter, toString
public RangeQueryOperation(LocalAbstractObject queryObject, float radius)
NoDataObject
) will be used.queryObject
- the query objectradius
- the query radiuspublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, boolean storeMetaDistances)
NoDataObject
) will be used.queryObject
- the query objectradius
- the query radiusstoreMetaDistances
- if true, all processed meta objects
will
store their sub-distances
in the answerpublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answerpublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType, boolean storeMetaDistances)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answerstoreMetaDistances
- if true, all processed meta objects
will
store their sub-distances
in the answerpublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, int maxAnswerSize)
NoDataObject
) will be used.queryObject
- the query objectradius
- the query radiusmaxAnswerSize
- sets the maximal answer sizepublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType, int maxAnswerSize)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answermaxAnswerSize
- sets the maximal answer sizepublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType, int maxAnswerSize, boolean storeMetaDistances)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answermaxAnswerSize
- sets the maximal answer sizestoreMetaDistances
- if true, all processed meta objects
will
store their sub-distances
in the answerpublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType, int maxAnswerSize, boolean storeMetaDistances, RankedSortedCollection answerCollection)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answermaxAnswerSize
- sets the maximal answer sizestoreMetaDistances
- if true, all processed meta objects
will
store their sub-distances
in the answeranswerCollection
- collection to be used as answer (it must be empty, otherwise it will be cleared)public float getRadius()
public float getAnswerThreshold()
RankingQueryOperation
LocalAbstractObject.MAX_DISTANCE
is returned.
Otherwise, the distance of the last answer's object is returned.getAnswerThreshold
in class RankingQueryOperation
LocalAbstractObject.MAX_DISTANCE
if there are not enough objects.public java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
getArgument
in class AbstractOperation
index
- index of an argument passed to constructorjava.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
getArgumentCount
in class AbstractOperation
public int evaluate(AbstractObjectIterator<? extends LocalAbstractObject> objects)
RankingSingleQueryOperation.addToAnswer(messif.objects.LocalAbstractObject, float)
.evaluate
in class QueryOperation<RankedAbstractObject>
objects
- the collection of objects on which to evaluate this queryprotected boolean dataEqualsImpl(QueryOperation obj)
dataEqualsImpl
in class QueryOperation<RankedAbstractObject>
obj
- the reference object with which to compare.true
if this object has the same data as the obj
argument; false
otherwise.public int dataHashCode()
dataHashCode
in class QueryOperation<RankedAbstractObject>