public class TopCombinedQueryOperation extends AggregationFunctionQueryOperation
k
objects from several sorted lists
(usually results of k-nearest neighbor queries). The aggregation function for combining the
distances in respective sorted lists can be specified as a "plug-in".
The threshold algorithm is used to actualy evaluate this query.
MetaObject
,
AggregationFunction
,
Serialized FormQueryOperation.DataEqualOperation
AbstractOperation.OperationConstructor, AbstractOperation.OperationName
Modifier and Type | Field and Description |
---|---|
protected java.lang.Class<? extends RankingQueryOperation> |
initialSAQueryClass
Query operation to execute for sorted accesses
|
protected int |
numberOfInitialSA
Number of sorted access objects to retrieve
|
protected boolean |
numberOfInitialSAProgressive
Progressive flag for the number of initial sorted accesses.
|
protected int |
numberOfRandomAccesses
Number of random accesses to execute
|
aggregationFunction, k
suppData, uuidOperationComparator
Constructor and Description |
---|
TopCombinedQueryOperation(LocalAbstractObject queryObject,
int k,
int numberOfInitialSA,
boolean numberOfInitialSAProgressive,
int numberOfRandomAccesses,
java.lang.Class<? extends RankingQueryOperation> initialSAQueryClass,
AggregationFunction aggregationFunction)
Creates a new instance of TopCombinedQueryOperation.
|
Modifier and Type | Method and Description |
---|---|
void |
clearSurplusData()
Clear non-messif data stored in operation.
|
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.
|
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.
|
java.lang.Class<? extends RankingQueryOperation> |
getInitialSAQueryClass()
Returns the class of the query operation to execute for initial sorted accesses.
|
int |
getNumberOfInitialSA()
Returns the number of initial sorted access objects to retrieve.
|
int |
getNumberOfRandomAccesses()
Returns the number of random accesses to execute.
|
boolean |
isNumberOfInitialSAProgressive()
Returns the progressive flag for the number of initial sorted accesses.
|
evaluate, getK, getQueryObject, getThresholdFunction
addToAnswer, addToAnswer, clone, createOperation, isStoringMetaDistances
addToAnswer, endOperation, getAnswer, getAnswer, getAnswerClass, getAnswerCollectionClass, getAnswerCollectionClone, getAnswerComparator, getAnswerCount, getAnswerDistance, getAnswerDistanceRestricted, getAnswerDistanceRestricted, getAnswerMaximalCapacity, getAnswerObjects, getAnswerThreshold, 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
protected final int numberOfInitialSA
protected final boolean numberOfInitialSAProgressive
k
.protected final int numberOfRandomAccesses
protected final java.lang.Class<? extends RankingQueryOperation> initialSAQueryClass
public TopCombinedQueryOperation(LocalAbstractObject queryObject, int k, int numberOfInitialSA, boolean numberOfInitialSAProgressive, int numberOfRandomAccesses, java.lang.Class<? extends RankingQueryOperation> initialSAQueryClass, AggregationFunction aggregationFunction)
MetaObject
in order to query multiple lists.
The parameter names for the aggregation should match the names in the MetaObject
.queryObject
- the query objectk
- the number of results to retrievenumberOfInitialSA
- the number of initial sorted access objectsnumberOfInitialSAProgressive
- flag whether the numberOfInitialSA
is a multiplier of k
(true) or an absolute number (false)numberOfRandomAccesses
- the maximal number of random accessesinitialSAQueryClass
- the query operation used to retrieve sorted access objectsaggregationFunction
- the aggregation function for combining the distances from sorted listspublic java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
getArgument
in class AggregationFunctionQueryOperation
index
- index of an argument passed to constructorjava.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
getArgumentCount
in class AggregationFunctionQueryOperation
public int getNumberOfInitialSA()
public boolean isNumberOfInitialSAProgressive()
k
.public int getNumberOfRandomAccesses()
public java.lang.Class<? extends RankingQueryOperation> getInitialSAQueryClass()
public void clearSurplusData()
clearSurplusData
in interface Clearable
clearSurplusData
in class RankingSingleQueryOperation
protected boolean dataEqualsImpl(QueryOperation obj)
dataEqualsImpl
in class AggregationFunctionQueryOperation
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 AggregationFunctionQueryOperation