|
||||||||||
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
public class AggregationFunctionQueryOperation
Aggregation function kNN query operation.
Allows to retrieve the best-matching k
objects (metaobjects) from any
storage using the AggregationFunction
function to evalute the
distance between the query object and the objects stored.
MetaObject
,
AggregationFunction
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class messif.operations.AbstractOperation |
---|
AbstractOperation.DataEqualOperation, AbstractOperation.OperationConstructor, AbstractOperation.OperationName |
Field Summary | |
---|---|
protected AggregationFunction |
aggregationFunction
Threshold function for measuring the overall similarity |
protected int |
k
Number of nearest (top) objects to retrieve |
protected MetaObject |
queryObject
Query object (accessible directly) |
Fields inherited from class messif.operations.QueryOperation |
---|
answerType |
Fields inherited from class messif.operations.AbstractOperation |
---|
errValue, operID, suppData |
Constructor Summary | |
---|---|
AggregationFunctionQueryOperation(LocalAbstractObject queryObject,
int k,
AggregationFunction aggregationFunction)
Creates a new instance of AggregationFunctionQueryOperation. |
|
AggregationFunctionQueryOperation(LocalAbstractObject queryObject,
int k,
AggregationFunction aggregationFunction,
AnswerType answerType,
boolean storeMetaDistances)
Creates a new instance of AggregationFunctionQueryOperation. |
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. |
int |
evaluate(AbstractObjectIterator<? extends LocalAbstractObject> objects)
Evaluate this query on a given set of objects. |
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. |
int |
getK()
Returns the number of nearest (top) objects to retrieve. |
MetaObject |
getQueryObject()
Returns the query (meta) object of this query operation. |
AggregationFunction |
getThresholdFunction()
Returns the threshold function for measuring the overall similarity. |
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 MetaObject queryObject
protected final int k
protected final AggregationFunction aggregationFunction
Constructor Detail |
---|
public AggregationFunctionQueryOperation(LocalAbstractObject queryObject, int k, AggregationFunction aggregationFunction)
MetaObject
to make the agg. function meaningful
The parameter names for the aggregation should match the names in the MetaObject
.
queryObject
- the query objectk
- the number of results to retrieveaggregationFunction
- the aggregation function for combining the distances from sorted listspublic AggregationFunctionQueryOperation(LocalAbstractObject queryObject, int k, AggregationFunction aggregationFunction, AnswerType answerType, boolean storeMetaDistances)
MetaObject
to make the agg. function meaningful
The parameter names for the aggregation should match the names in the MetaObject
.
queryObject
- the query objectk
- the number of results to retrieveaggregationFunction
- the aggregation function for combining the distances from sorted listsanswerType
- the type of objects this operation stores in its answerstoreMetaDistances
- if true, all processed meta objects
willMethod Detail |
---|
public java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
getArgument
in class AbstractOperation
index
- index of an argument passed to constructor
java.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
getArgumentCount
in class AbstractOperation
public MetaObject getQueryObject()
public int getK()
public AggregationFunction getThresholdFunction()
public int evaluate(AbstractObjectIterator<? extends LocalAbstractObject> objects)
RankingQueryOperation.addToAnswer(messif.objects.LocalAbstractObject, messif.objects.LocalAbstractObject, float)
.
evaluate
in class QueryOperation<RankedAbstractObject>
objects
- the collection of objects on which to evaluate this query
public void clearSurplusData()
clearSurplusData
in interface Clearable
clearSurplusData
in class RankingQueryOperation
protected boolean dataEqualsImpl(AbstractOperation obj)
dataEqualsImpl
in class AbstractOperation
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 AbstractOperation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |