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