|
||||||||||
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.RangeQueryOperation
public class RangeQueryOperation
Range query operation. Retrieves all objects that have their distances to the specified query object less than or equal to the specified radius.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class messif.operations.AbstractOperation |
---|
AbstractOperation.DataEqualOperation, AbstractOperation.OperationConstructor, AbstractOperation.OperationName |
Field Summary | |
---|---|
protected LocalAbstractObject |
queryObject
Range query object |
protected float |
radius
Range query radius |
Fields inherited from class messif.operations.QueryOperation |
---|
answerType |
Fields inherited from class messif.operations.AbstractOperation |
---|
errValue, operID, suppData |
Constructor Summary | |
---|---|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius)
Creates a new instance of RangeQueryOperation for a given query object and radius. |
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType)
Creates a new instance of RangeQueryOperation for a given query object and radius. |
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType,
boolean storeMetaDistances)
Creates a new instance of RangeQueryOperation for a given query object and radius. |
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType,
int maxAnswerSize)
Creates a new instance of RangeQueryOperation for a given query object, radius and maximal number of objects to return. |
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
AnswerType answerType,
int maxAnswerSize,
boolean storeMetaDistances)
Creates a new instance of RangeQueryOperation for a given query object, radius and maximal number of objects to return. |
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
boolean storeMetaDistances)
Creates a new instance of RangeQueryOperation for a given query object and radius. |
|
RangeQueryOperation(LocalAbstractObject queryObject,
float radius,
int maxAnswerSize)
Creates a new instance of RangeQueryOperation for a given query object, radius and maximal number of objects to return. |
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.Class<? extends RankedAbstractObject> |
getAnswerClass()
Returns the class of objects this operation stores in its answer. |
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. |
LocalAbstractObject |
getQueryObject()
Returns the query object of this range query. |
float |
getRadius()
Returns the radius of this range query. |
Methods inherited from class messif.operations.RankingQueryOperation |
---|
addToAnswer, addToAnswer, clone, getAnswer, getAnswer, getAnswerCount, getAnswerDistance, getAnswerObjects, 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 LocalAbstractObject queryObject
protected final float radius
Constructor Detail |
---|
public RangeQueryOperation(LocalAbstractObject queryObject, float radius)
NoDataObject
) will be used.
queryObject
- the query objectradius
- the query radiuspublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, boolean storeMetaDistances)
NoDataObject
) will be used.
queryObject
- the query objectradius
- the query radiusstoreMetaDistances
- if true, all processed meta objects
will
store their sub-distances
in the answerpublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answerpublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType, boolean storeMetaDistances)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answerstoreMetaDistances
- if true, all processed meta objects
will
store their sub-distances
in the answerpublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, int maxAnswerSize)
NoDataObject
) will be used.
queryObject
- the query objectradius
- the query radiusmaxAnswerSize
- sets the maximal answer sizepublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType, int maxAnswerSize)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answermaxAnswerSize
- sets the maximal answer sizepublic RangeQueryOperation(LocalAbstractObject queryObject, float radius, AnswerType answerType, int maxAnswerSize, boolean storeMetaDistances)
queryObject
- the query objectradius
- the query radiusanswerType
- the type of objects this operation stores in its answermaxAnswerSize
- sets the maximal answer sizestoreMetaDistances
- if true, all processed meta objects
will
store their sub-distances
in the answerMethod Detail |
---|
public LocalAbstractObject getQueryObject()
public float getRadius()
public float getAnswerThreshold()
getRadius()
is returned.
Otherwise, the distance of the last answer's object is returned.
getAnswerThreshold
in class RankingQueryOperation
getRadius()
if there are not enough objects.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 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 java.lang.Class<? extends RankedAbstractObject> getAnswerClass()
getAnswerClass
in class RankingQueryOperation
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 |