|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.obsearch.query.AbstractOBQuery<O>
net.obsearch.query.OBQueryLong<O>
public final class OBQueryLong<O extends OBLong>
Object used to store a query request.
Field Summary | |
---|---|
protected long[] |
max
Maximum part of the rectangle of the query. |
protected long[] |
min
Minimum part of the rectangle of the query. |
protected OBPriorityQueueLong<O> |
result
Holds the results for the query. |
protected long[] |
smap
SMAPed vector |
Constructor Summary | |
---|---|
OBQueryLong()
Constructor. |
|
OBQueryLong(O object,
long range,
OBPriorityQueueLong<O> result)
Creates a new OBQueryLong object. |
|
OBQueryLong(O object,
long range,
OBPriorityQueueLong<O> result,
long[] smap)
Creates a new OBQueryLong object. |
|
OBQueryLong(O object,
OBPriorityQueueLong<O> result)
|
Method Summary | |
---|---|
boolean |
add(long id,
O object)
|
boolean |
add(long id,
O obj,
long d)
Add the given object, object id and distance of type float to the queue. |
double |
approx(long[] dbin)
Calculate the 1 + E or (c for Adonis et al) for approx. |
boolean |
collides(long[][] rectangle)
Returns true if the given rectangle collides with this query. |
double |
compound(long[] dbin)
Calculates ep without multiplying by 1/k and |
double |
ep(List<net.obsearch.AbstractOBResult<O>> dbin)
|
double |
ep(long[] dbin)
Calculate the EP value for a sorted list of distances. |
long |
getDistance()
|
long[] |
getHigh()
Return low of the query rectangle. |
long[] |
getLow()
Return low of the query rectangle. |
O |
getObject()
|
OBPriorityQueueLong<O> |
getResult()
|
List<net.obsearch.AbstractOBResult<O>> |
getSortedElements()
|
boolean |
isCandidate(long smapDistance)
Returns true if we should calculate the real distance. |
boolean |
isFull()
|
long |
peek()
peek to the largest value if the queue is full. |
double |
precision(long[] dbin)
Calculates the precision |
double |
rde(long[] dbin)
|
double |
recall(List<net.obsearch.AbstractOBResult<O>> perfectQuery)
|
void |
setResult(OBPriorityQueueLong<O> result)
Set the results of the matching to a new object. |
double |
tDR(long[] dbin)
Total distance ratio |
boolean |
updatedRange(long 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 OBPriorityQueueLong<O extends OBLong> result
protected long[] min
protected long[] max
protected long[] smap
Constructor Detail |
---|
public OBQueryLong()
public OBQueryLong(O object, long range, OBPriorityQueueLong<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 OBQueryLong(O object, OBPriorityQueueLong<O> result)
public OBQueryLong(O object, long range, OBPriorityQueueLong<O> result, long[] 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(long[][] rectangle)
rectangle
- The rectangle to search.public long[] getLow()
public long[] getHigh()
public OBPriorityQueueLong<O> getResult()
public void setResult(OBPriorityQueueLong<O> result)
result
- The new result.public boolean isCandidate(long 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 OBLong>
InstantiationException
IllegalAccessException
net.obsearch.exception.OBException
public long getDistance()
public List<net.obsearch.AbstractOBResult<O>> getSortedElements()
getSortedElements
in class net.obsearch.query.AbstractOBQuery<O extends OBLong>
public boolean add(long id, O obj, long 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(long originalRange)
public boolean isFull()
isFull
in class net.obsearch.query.AbstractOBQuery<O extends OBLong>
public double recall(List<net.obsearch.AbstractOBResult<O>> perfectQuery)
recall
in class net.obsearch.query.AbstractOBQuery<O extends OBLong>
public double ep(List<net.obsearch.AbstractOBResult<O>> dbin)
ep
in class net.obsearch.query.AbstractOBQuery<O extends OBLong>
public double ep(long[] dbin)
public double approx(long[] dbin) throws net.obsearch.exception.OBException
q
-
RAException
net.obsearch.exception.OBException
public double compound(long[] dbin)
public double rde(long[] dbin)
public double tDR(long[] dbin)
public double precision(long[] dbin)
public long 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 |