|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.obsearch.query.AbstractOBQuery<O> net.obsearch.query.OBQueryDouble<O>
public final class OBQueryDouble<O extends OBDouble>
Object used to store a query request.
Field Summary | |
---|---|
protected double[] |
max
Maximum part of the rectangle of the query. |
protected double[] |
min
Minimum part of the rectangle of the query. |
protected OBPriorityQueueDouble<O> |
result
Holds the results for the query. |
protected double[] |
smap
SMAPed vector |
Constructor Summary | |
---|---|
OBQueryDouble()
Constructor. |
|
OBQueryDouble(O object,
double range,
OBPriorityQueueDouble<O> result)
Creates a new OBQueryDouble object. |
|
OBQueryDouble(O object,
double range,
OBPriorityQueueDouble<O> result,
double[] smap)
Creates a new OBQueryDouble object. |
|
OBQueryDouble(O object,
OBPriorityQueueDouble<O> result)
|
Method Summary | |
---|---|
boolean |
add(long id,
O object)
|
boolean |
add(long id,
O obj,
double d)
Add the given object, object id and distance of type float to the queue. |
double |
approx(double[] dbin)
Calculate the 1 + E or (c for Adonis et al) for approx. |
boolean |
collides(double[][] rectangle)
Returns true if the given rectangle collides with this query. |
double |
compound(double[] dbin)
Calculates ep without multiplying by 1/k and |
double |
ep(double[] dbin)
Calculate the EP value for a sorted list of distances. |
double |
ep(List<net.obsearch.AbstractOBResult<O>> dbin)
|
double |
getDistance()
|
double[] |
getHigh()
Return low of the query rectangle. |
double[] |
getLow()
Return low of the query rectangle. |
O |
getObject()
|
OBPriorityQueueDouble<O> |
getResult()
|
List<net.obsearch.AbstractOBResult<O>> |
getSortedElements()
|
boolean |
isCandidate(double smapDistance)
Returns true if we should calculate the real distance. |
boolean |
isFull()
|
double |
peek()
peek to the largest value if the queue is full. |
double |
precision(double[] dbin)
Calculates the precision |
double |
rde(double[] dbin)
|
double |
recall(List<net.obsearch.AbstractOBResult<O>> perfectQuery)
|
void |
setResult(OBPriorityQueueDouble<O> result)
Set the results of the matching to a new object. |
double |
tDR(double[] dbin)
Total distance ratio |
boolean |
updatedRange(double originalRange)
Returns true if the originalRange has been modified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OBPriorityQueueDouble<O extends OBDouble> result
protected double[] min
protected double[] max
protected double[] smap
Constructor Detail |
---|
public OBQueryDouble()
public OBQueryDouble(O object, double range, OBPriorityQueueDouble<O> result)
object
- The object that will be matched.range
- The range to be used for the match.result
- The priority queue were the results will be stored.public OBQueryDouble(O object, OBPriorityQueueDouble<O> result)
public OBQueryDouble(O object, double range, OBPriorityQueueDouble<O> result, double[] smap)
object
- The object that will be matched.range
- The range to be used for the match.result
- The priority queue were the results will be stored.smap
- SMAP vector representation of the given object.Method Detail |
---|
public O getObject()
public boolean collides(double[][] rectangle)
rectangle
- The rectangle to search.public double[] getLow()
public double[] getHigh()
public OBPriorityQueueDouble<O> getResult()
public void setResult(OBPriorityQueueDouble<O> result)
result
- The new result.public boolean isCandidate(double smapDistance)
smapDistance
- The lower-resolution distance calculated
with SMAP.public boolean add(long id, O object) throws InstantiationException, IllegalAccessException, net.obsearch.exception.OBException
add
in class net.obsearch.query.AbstractOBQuery<O extends OBDouble>
InstantiationException
IllegalAccessException
net.obsearch.exception.OBException
public double getDistance()
public List<net.obsearch.AbstractOBResult<O>> getSortedElements()
getSortedElements
in class net.obsearch.query.AbstractOBQuery<O extends OBDouble>
public boolean add(long id, O obj, double d) throws InstantiationException, IllegalAccessException
id
- The id of the object to be usedobj
- The object to be addedd
- The distance to be added
IllegalAccessException
- If there is a problem when instantiating objects O
InstantiationException
- If there is a problem when instantiating objects Opublic boolean updatedRange(double originalRange)
public boolean isFull()
isFull
in class net.obsearch.query.AbstractOBQuery<O extends OBDouble>
public double recall(List<net.obsearch.AbstractOBResult<O>> perfectQuery)
recall
in class net.obsearch.query.AbstractOBQuery<O extends OBDouble>
public double ep(List<net.obsearch.AbstractOBResult<O>> dbin)
ep
in class net.obsearch.query.AbstractOBQuery<O extends OBDouble>
public double ep(double[] dbin)
public double approx(double[] dbin) throws net.obsearch.exception.OBException
q
-
RAException
net.obsearch.exception.OBException
public double compound(double[] dbin)
public double rde(double[] dbin)
public double tDR(double[] dbin)
public double precision(double[] dbin)
public double peek() throws net.obsearch.exception.OBException
net.obsearch.exception.OBException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |