|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.operations.AbstractOperation
messif.operations.QueryOperation<RankedAbstractObject>
messif.operations.RankingQueryOperation
messif.operations.query.AggregationFunctionQueryOperation
messif.operations.query.TopCombinedQueryOperation
public class TopCombinedQueryOperation
Top-k combined query operation.
Allows to retrieve the best-matching 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 FormNested Class Summary |
---|
Nested classes/interfaces inherited from class messif.operations.AbstractOperation |
---|
AbstractOperation.DataEqualOperation, AbstractOperation.OperationConstructor, AbstractOperation.OperationName |
Field Summary | |
---|---|
protected java.lang.Class<? extends QueryOperation> |
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 |
Fields inherited from class messif.operations.query.AggregationFunctionQueryOperation |
---|
aggregationFunction, k, queryObject |
Fields inherited from class messif.operations.QueryOperation |
---|
answerType |
Fields inherited from class messif.operations.AbstractOperation |
---|
errValue, operID, suppData |
Constructor Summary | |
---|---|
TopCombinedQueryOperation(LocalAbstractObject queryObject,
int k,
int numberOfInitialSA,
boolean numberOfInitialSAProgressive,
int numberOfRandomAccesses,
java.lang.Class<? extends QueryOperation> initialSAQueryClass,
AggregationFunction aggregationFunction)
Creates a new instance of TopCombinedQueryOperation. |
Method Summary | |
---|---|
void |
clearSurplusData()
Clear non-messif data stored in operation. |
protected boolean |
dataEqualsImpl(AbstractOperation 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 QueryOperation> |
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. |
Methods inherited from class messif.operations.query.AggregationFunctionQueryOperation |
---|
evaluate, getK, getQueryObject, getThresholdFunction |
Methods inherited from class messif.operations.RankingQueryOperation |
---|
addToAnswer, addToAnswer, clone, getAnswer, getAnswer, getAnswerClass, getAnswerCount, getAnswerDistance, getAnswerObjects, getAnswerThreshold, getLastAnswer, isAnswerFull, isStoringMetaDistances, resetAnswer, setAnswerCollection, updateFrom, updateFrom |
Methods inherited from class messif.operations.QueryOperation |
---|
appendErrorCode, endOperation, getAnswerType, wasSuccessful |
Methods inherited from class messif.operations.AbstractOperation |
---|
appendArguments, createOperation, dataEquals, endOperation, equals, getAnnotatedConstructor, getAnnotatedConstructor, getConstructorArgumentDescriptions, getConstructorArgumentDescriptions, getConstructorArguments, getConstructorArguments, getConstructorDescription, getErrorCode, getName, getName, getOperationID, hashCode, isFinished, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final int numberOfInitialSA
protected final boolean numberOfInitialSAProgressive
k
.
protected final int numberOfRandomAccesses
protected final java.lang.Class<? extends QueryOperation> initialSAQueryClass
Constructor Detail |
---|
public TopCombinedQueryOperation(LocalAbstractObject queryObject, int k, int numberOfInitialSA, boolean numberOfInitialSAProgressive, int numberOfRandomAccesses, java.lang.Class<? extends QueryOperation> 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 listsMethod Detail |
---|
public java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
getArgument
in class AggregationFunctionQueryOperation
index
- index of an argument passed to constructor
java.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 QueryOperation> getInitialSAQueryClass()
public void clearSurplusData()
clearSurplusData
in interface Clearable
clearSurplusData
in class AggregationFunctionQueryOperation
protected boolean dataEqualsImpl(AbstractOperation 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |