|
||||||||||
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.KNNQueryOperation
messif.operations.query.ApproxKNNQueryOperation
public class ApproxKNNQueryOperation
Approximate k-nearest neighbors query with specific early termination parameters and support for obtaining some guarantees on results.
Nested Class Summary | |
---|---|
static class |
ApproxKNNQueryOperation.LocalSearchType
Enumeration of types of the stop condition for approximation's early termination strategy. |
Nested classes/interfaces inherited from class messif.operations.AbstractOperation |
---|
AbstractOperation.DataEqualOperation, AbstractOperation.OperationConstructor, AbstractOperation.OperationName |
Field Summary | |
---|---|
protected int |
localSearchParam
Value of the local approximation parameter. |
protected ApproxKNNQueryOperation.LocalSearchType |
localSearchType
Type of the local approximation parameter used. |
protected float |
radiusGuaranteed
Radius for which the answer is guaranteed as correct. |
Fields inherited from class messif.operations.query.KNNQueryOperation |
---|
k, queryObject |
Fields inherited from class messif.operations.QueryOperation |
---|
answerType |
Fields inherited from class messif.operations.AbstractOperation |
---|
errValue, operID, suppData |
Constructor Summary | |
---|---|
ApproxKNNQueryOperation(LocalAbstractObject queryObject,
int k)
Creates a new instance of ApproxkNNQueryOperation for a given query object and maximal number of objects to return. |
|
ApproxKNNQueryOperation(LocalAbstractObject queryObject,
int k,
AnswerType answerType)
Creates a new instance of ApproxkNNQueryOperation for a given query object and maximal number of objects to return. |
|
ApproxKNNQueryOperation(LocalAbstractObject queryObject,
int k,
AnswerType answerType,
int localSearchParam,
ApproxKNNQueryOperation.LocalSearchType localSearchType,
float radiusGuaranteed)
Creates a new instance of ApproxKNNQueryOperation for a given query object, maximal number of objects to return and parameters that control the approximation. |
|
ApproxKNNQueryOperation(LocalAbstractObject queryObject,
int k,
boolean storeMetaDistances,
AnswerType answerType,
int localSearchParam,
ApproxKNNQueryOperation.LocalSearchType localSearchType,
float radiusGuaranteed)
Creates a new instance of ApproxKNNQueryOperation for a given query object, maximal number of objects to return and parameters that control the approximation. |
|
ApproxKNNQueryOperation(LocalAbstractObject queryObject,
int k,
int localSearchParam,
ApproxKNNQueryOperation.LocalSearchType localSearchType,
float radiusGuaranteed)
Creates a new instance of ApproxKNNQueryOperation for a given query object, maximal number of objects to return and parameters that control the approximation. |
Method Summary | |
---|---|
int |
getLocalSearchParam()
Returns the value of the local approximation parameter. |
ApproxKNNQueryOperation.LocalSearchType |
getLocalSearchType()
Returns the type of the local approximation parameter used. |
float |
getRadiusGuaranteed()
Returns a currently set value of radius within which the results are guaranteed as correct. |
void |
setLocalSearchParam(int localSearchParam)
Setter for the local search parameter localSearchParam |
void |
setLocalSearchType(ApproxKNNQueryOperation.LocalSearchType localSearchType)
Setter for the type of the local search parameter localSearchType |
void |
setRadiusGuaranteed(float radiusGuaranteed)
Set a different value of radius within which the results are guaranteed as correct. |
protected void |
updateFrom(ApproxKNNQueryOperation operation)
Updates the guaranteed radius from another approximate kNN query. |
protected void |
updateFrom(RankingQueryOperation operation)
Update query answer data of this operation from another query operation. |
Methods inherited from class messif.operations.query.KNNQueryOperation |
---|
clearSurplusData, dataEqualsImpl, dataHashCode, evaluate, getArgument, getArgumentCount, getK, getQueryObject |
Methods inherited from class messif.operations.RankingQueryOperation |
---|
addToAnswer, addToAnswer, clone, getAnswer, getAnswer, getAnswerClass, getAnswerCount, getAnswerDistance, getAnswerObjects, getAnswerThreshold, getLastAnswer, isAnswerFull, isStoringMetaDistances, resetAnswer, setAnswerCollection, 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 ApproxKNNQueryOperation.LocalSearchType localSearchType
protected int localSearchParam
localSearchType
.
protected float radiusGuaranteed
Constructor Detail |
---|
public ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k)
AnswerType.NODATA_OBJECTS
will be returned in the result.
queryObject
- query objectk
- number of objects to be returnedpublic ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k, AnswerType answerType)
queryObject
- the object to which the nearest neighbors are searchedk
- the number of nearest neighbors to retrieveanswerType
- the type of objects this operation stores in its answerpublic ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k, int localSearchParam, ApproxKNNQueryOperation.LocalSearchType localSearchType, float radiusGuaranteed)
queryObject
- query objectk
- number of objects to be returnedlocalSearchParam
- local search parameter - typically approximation parameterlocalSearchType
- type of the local search parameterradiusGuaranteed
- radius within which the answer is required to be guaranteed as correctpublic ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k, AnswerType answerType, int localSearchParam, ApproxKNNQueryOperation.LocalSearchType localSearchType, float radiusGuaranteed)
queryObject
- query objectk
- number of objects to be returnedanswerType
- the type of objects this operation stores in its answerlocalSearchParam
- local search parameter - typically approximation parameterlocalSearchType
- type of the local search parameterradiusGuaranteed
- radius within which the answer is required to be guaranteed as correctpublic ApproxKNNQueryOperation(LocalAbstractObject queryObject, int k, boolean storeMetaDistances, AnswerType answerType, int localSearchParam, ApproxKNNQueryOperation.LocalSearchType localSearchType, float radiusGuaranteed)
queryObject
- query objectk
- number of objects to be returnedstoreMetaDistances
- if true, all processed meta objects
will
store their sub-distances
in the answeranswerType
- the type of objects this operation stores in its answerlocalSearchParam
- local search parameter - typically approximation parameterlocalSearchType
- type of the local search parameterradiusGuaranteed
- radius within which the answer is required to be guaranteed as correctMethod Detail |
---|
public ApproxKNNQueryOperation.LocalSearchType getLocalSearchType()
type of the local approximation
parameter used.
type of the local approximation
parameter usedpublic void setLocalSearchParam(int localSearchParam)
localSearchParam
localSearchParam
- new local search parameter localSearchParam
public void setLocalSearchType(ApproxKNNQueryOperation.LocalSearchType localSearchType)
localSearchType
localSearchType
- new localSearchType
public int getLocalSearchParam()
local search type
.
public void setRadiusGuaranteed(float radiusGuaranteed)
radiusGuaranteed
- new guaranteed radius valuepublic float getRadiusGuaranteed()
protected void updateFrom(RankingQueryOperation operation)
operation
is approximate kNN query, the
radius guaranteed is also updated.
updateFrom
in class RankingQueryOperation
operation
- the operation to update answer fromprotected void updateFrom(ApproxKNNQueryOperation operation)
operation
- the operation to update answer from
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |