public class RangeMultiQueryOperation extends RankingMultiQueryOperation
QueryOperation.DataEqualOperation
AbstractOperation.OperationConstructor, AbstractOperation.OperationName
Modifier and Type | Field and Description |
---|---|
protected float |
radius
Range query radius
|
suppData, uuidOperationComparator
Constructor and Description |
---|
RangeMultiQueryOperation(LocalAbstractObject[] queryObjects,
float radius)
Creates a new instance of RangeMultiQueryOperation for given query objects and radius.
|
RangeMultiQueryOperation(LocalAbstractObject[] queryObjects,
float radius,
AnswerType answerType,
DistanceFunctionMultiObject<? super LocalAbstractObject> distanceFunction)
Creates a new instance of RangeMultiQueryOperation for given query objects and radius.
|
RangeMultiQueryOperation(LocalAbstractObject[] queryObjects,
float radius,
boolean storedIndividualDistances,
AnswerType answerType,
DistanceFunctionMultiObject<? super LocalAbstractObject> distanceFunction)
Creates a new instance of RangeMultiQueryOperation for given query objects and radius.
|
RangeMultiQueryOperation(LocalAbstractObject[] queryObjects,
float radius,
DistanceFunctionMultiObject<? super LocalAbstractObject> distanceFunction)
Creates a new instance of RangeMultiQueryOperation for given query objects and radius.
|
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, addToAnswerInternal, clearSurplusData, clone, createOperation, getArgumentString, getDistanceFunction, getQueryObject, getQueryObjects, getQueryObjectsCount, isStoringIndividualDistances, loadObjects, toObjectArray
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, getConstructorArgumentDescriptions, getConstructorArgumentDescriptions, getConstructorArguments, getConstructorArguments, getConstructorDescription, getErrorCode, getName, getName, getOperationID, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, hashCode, isErrorCode, isFinished, removeParameter, setParameter, toString
public RangeMultiQueryOperation(LocalAbstractObject[] queryObjects, float radius)
no-data objects
.
The distance function is sum aggregation
.queryObjects
- the objects to which the nearest neighbors are searchedradius
- the query radiuspublic RangeMultiQueryOperation(LocalAbstractObject[] queryObjects, float radius, DistanceFunctionMultiObject<? super LocalAbstractObject> distanceFunction)
no-data objects
.queryObjects
- the objects to which the nearest neighbors are searchedradius
- the query radiusdistanceFunction
- the distance function for computing the distances between a data object and all query objectspublic RangeMultiQueryOperation(LocalAbstractObject[] queryObjects, float radius, AnswerType answerType, DistanceFunctionMultiObject<? super LocalAbstractObject> distanceFunction)
queryObjects
- the objects to which the nearest neighbors are searchedradius
- the query radiusanswerType
- the type of objects this operation stores in its answerdistanceFunction
- the distance function for computing the distances between a data object and all query objectspublic RangeMultiQueryOperation(LocalAbstractObject[] queryObjects, float radius, boolean storedIndividualDistances, AnswerType answerType, DistanceFunctionMultiObject<? super LocalAbstractObject> distanceFunction)
queryObjects
- the objects to which the nearest neighbors are searchedradius
- the query radiusstoredIndividualDistances
- if true, all distances between the data object and all query objects are
stored in sub-distances
answerType
- the type of objects this operation stores in its answerdistanceFunction
- the distance function for computing the distances between a data object and all query objectspublic 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
AbstractOperation
getArgument
in class AbstractOperation
index
- zero-based index of an argument passed to constructorjava.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
AbstractOperation
getArgumentCount
in class AbstractOperation
public int evaluate(AbstractObjectIterator<? extends LocalAbstractObject> objects)
QueryOperation
evaluate
in class QueryOperation<RankedAbstractObject>
objects
- the collection of objects on which to evaluate this queryprotected boolean dataEqualsImpl(QueryOperation obj)
QueryOperation
dataEqualsImpl
in class RankingMultiQueryOperation
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()
QueryOperation
dataHashCode
in class RankingMultiQueryOperation