|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.obsearch.index.AbstractOBIndex<O> net.obsearch.index.pivot.AbstractPivotOBIndex<O> net.obsearch.index.bucket.AbstractBucketIndex<O,B,Q,BC> net.obsearch.index.sorter.AbstractBucketSorter<O,B,Q,BC,SketchProjection,CBitVector> net.obsearch.index.ghs.AbstractSketch64<O,BucketObjectLong<O>,OBQueryLong<O>,SleekBucketLong<O>> net.obsearch.index.ghs.impl.Sketch64Long<O>
public final class Sketch64Long<O extends OBLong>
Nested Class Summary | |
---|---|
protected class |
Sketch64Long.KnnIterator
Implements a knn graph iteration over all the dataset |
Nested classes/interfaces inherited from class net.obsearch.index.bucket.AbstractBucketIndex |
---|
AbstractBucketIndex.BucketIterator |
Field Summary |
---|
Fields inherited from class net.obsearch.index.ghs.AbstractSketch64 |
---|
distortionStats, m, maskPivotSelector, pivotGrid |
Fields inherited from class net.obsearch.index.sorter.AbstractBucketSorter |
---|
bucketCache, bucketPivotCount, kEstimators, projections, projectionStorage, userK |
Fields inherited from class net.obsearch.index.bucket.AbstractBucketIndex |
---|
Buckets |
Fields inherited from class net.obsearch.index.pivot.AbstractPivotOBIndex |
---|
intrinsicDimensionalityPairs, pivots, pivotSelector |
Fields inherited from class net.obsearch.index.AbstractOBIndex |
---|
A, fact, isFrozen, stats, type |
Fields inherited from interface net.obsearch.Index |
---|
ID_SIZE |
Constructor Summary | |
---|---|
Sketch64Long()
|
|
Sketch64Long(Class<O> type,
IncrementalPairPivotSelector<O> pivotSelector,
int m)
Create a new Sketch64Long with m bytes. |
Method Summary | |
---|---|
protected double |
distance(O a,
O b)
|
long[] |
fullMatchLite(O query,
boolean filterSame)
This method returns a list of all the distances of the query against the DB. |
BucketObjectLong<O> |
getBucket(O object)
Returns the bucket information for the given object. |
protected int |
getCPSize()
Return the compact representation size |
protected AbstractOBQuery<O> |
getKQuery(O object,
int k)
Returns a k query for the given object. |
protected Class<CBitVector> |
getPInstance()
|
SketchProjection |
getProjection(BucketObjectLong<O> bucket)
Compute the sketch for the given object. |
protected SleekBucketLong<O> |
instantiateBucketContainer(byte[] data,
byte[] address)
Get a bucket container from the given data. |
Iterator<List<OBQueryLong<O>>> |
knnGraph(int k,
long r)
Performs a knn graph search |
protected void |
maxKEstimationAux(O object)
Get the kMax closest objects. |
protected int |
primitiveDataTypeSize()
Return the size in bytes of the underlying primitive datatype. |
void |
searchOB(O object,
long r,
Filter<O> filter,
OBPriorityQueueLong<O> result)
Searches the Index and returns OBResult (ID, OB and distance) elements that are closer to "object". |
void |
searchOB(O object,
long r,
OBPriorityQueueLong<O> result)
Searches the Index and returns OBResult (ID, OB and distance) elements that are closer to "object". |
Methods inherited from class net.obsearch.index.ghs.AbstractSketch64 |
---|
bytesToCompactRepresentation, compactRepresentationToBytes, debugDist, freeze, updateDistance |
Methods inherited from class net.obsearch.index.sorter.AbstractBucketSorter |
---|
bucketStats, calculateEstimators, close, estimateK, freezeDefault, getAddress, getAllObjects, getBucketContainer, getBucketPivotCount, getExpectedEP, getMaxK, init, initByteArrayBuckets, initCache, insertBucket, insertBucketBulk, loadMasks, maxKEstimation, printEstimation, searchBuckets, setExpectedError, setKAlpha, setMaxK, setSampleSize |
Methods inherited from class net.obsearch.index.bucket.AbstractBucketIndex |
---|
debug, deleteAux, exists, getBuckets, getObjectFreeze, idMap, insertAux, insertAuxBulk, iterateBuckets |
Methods inherited from class net.obsearch.index.pivot.AbstractPivotOBIndex |
---|
calculateIntrinsicDimensionality, createPivotsArray, getObjects, getPivotCount, selectPivots |
Methods inherited from class net.obsearch.index.AbstractOBIndex |
---|
assertFrozen, bytesToObject, bytesToObject, clearACache, databaseSize, delete, emptyPivotsArray, findAux, getBox, getObject, getStats, getType, initStorageDevices, insert, insert, insertBulk, insertBulk, intrinsicDimensionality, isFrozen, isPreFreeze, isPreFreezeCheck, loadObject, loadPivots, objectToByteBuffer, objectToBytes, resetStats, serializePivots, setFixedRecord, setFixedRecord, setIdAutoGeneration, setPreFreeze, setPreFreezeCheck, totalBoxes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.obsearch.Index |
---|
close, databaseSize, debug, delete, exists, freeze, getBox, getObject, getStats, getType, init, insert, insert, insertBulk, insertBulk, isFrozen, loadObject, resetStats, setPreFreezeCheck, totalBoxes |
Constructor Detail |
---|
public Sketch64Long(Class<O> type, IncrementalPairPivotSelector<O> pivotSelector, int m) throws OBStorageException, OBException, IOException
type
- Type of object that will be storedpivotSelector
- Pivot selection strategy to be employed.m
- The number of bitsbucketPivotCount
- Number of pivots per bucket
OBStorageException
OBException
IOException
public Sketch64Long()
Method Detail |
---|
public BucketObjectLong<O> getBucket(O object) throws OBException, InstantiationException, IllegalAccessException
AbstractBucketIndex
getBucket
in class AbstractBucketIndex<O extends OBLong,BucketObjectLong<O extends OBLong>,OBQueryLong<O extends OBLong>,SleekBucketLong<O extends OBLong>>
object
- The object that will be calculated
IllegalAccessException
OBException
InstantiationException
public SketchProjection getProjection(BucketObjectLong<O> bucket) throws OBException
getProjection
in class AbstractBucketSorter<O extends OBLong,BucketObjectLong<O extends OBLong>,OBQueryLong<O extends OBLong>,SleekBucketLong<O extends OBLong>,SketchProjection,CBitVector>
OBException
protected SleekBucketLong<O> instantiateBucketContainer(byte[] data, byte[] address) throws InstantiationException, IllegalAccessException, OBException
AbstractBucketIndex
instantiateBucketContainer
in class AbstractBucketIndex<O extends OBLong,BucketObjectLong<O extends OBLong>,OBQueryLong<O extends OBLong>,SleekBucketLong<O extends OBLong>>
data
- The data from which the bucket container will be loaded.
InstantiationException
IllegalAccessException
OBException
protected int primitiveDataTypeSize()
AbstractBucketIndex
primitiveDataTypeSize
in class AbstractBucketIndex<O extends OBLong,BucketObjectLong<O extends OBLong>,OBQueryLong<O extends OBLong>,SleekBucketLong<O extends OBLong>>
public void searchOB(O object, long r, OBPriorityQueueLong<O> result) throws NotFrozenException, InstantiationException, IllegalIdException, IllegalAccessException, OutOfRangeException, OBException
IndexLong
searchOB
in interface IndexLong<O extends OBLong>
object
- The object that has to be searchedr
- The range to be usedresult
- A priority queue that will hold the result
NotFrozenException
- if the index has not been frozen.
InstantiationException
- If there is a problem when instantiating objects O
IllegalIdException
- This exception is left as a Debug flag. If you receive
this exception please report the problem to:
http://code.google.com/p/obsearch/issues/list
IllegalAccessException
- If there is a problem when instantiating objects O
OutOfRangeException
- If the distance of any object to any other object exceeds
the range defined by the user.
OBException
- User generated exceptionprotected AbstractOBQuery<O> getKQuery(O object, int k) throws OBException, InstantiationException, IllegalAccessException
AbstractBucketSorter
getKQuery
in class AbstractBucketSorter<O extends OBLong,BucketObjectLong<O extends OBLong>,OBQueryLong<O extends OBLong>,SleekBucketLong<O extends OBLong>,SketchProjection,CBitVector>
object
- (query object)k
- the number of objects to accept in the query.
OBException
InstantiationException
IllegalAccessException
public void searchOB(O object, long r, Filter<O> filter, OBPriorityQueueLong<O> result) throws NotFrozenException, InstantiationException, IllegalIdException, IllegalAccessException, OutOfRangeException, OBException
IndexLong
searchOB
in interface IndexLong<O extends OBLong>
object
- The object that has to be searchedr
- The range to be usedresult
- A priority queue that will hold the result
NotFrozenException
- if the index has not been frozen.
InstantiationException
- If there is a problem when instantiating objects O
IllegalIdException
- This exception is left as a Debug flag. If you receive
this exception please report the problem to:
http://code.google.com/p/obsearch/issues/list
IllegalAccessException
- If there is a problem when instantiating objects O
OutOfRangeException
- If the distance of any object to any other object exceeds
the range defined by the user.
OBException
- User generated exceptionpublic Iterator<List<OBQueryLong<O>>> knnGraph(int k, long r)
public long[] fullMatchLite(O query, boolean filterSame) throws OBException, IllegalAccessException, InstantiationException
fullMatchLite
in interface IndexLong<O extends OBLong>
query
- filterSame
- if True we do not return objects o such that query.equals(o)
OBException
InstantiationException
IllegalAccessException
protected void maxKEstimationAux(O object) throws OBException, InstantiationException, IllegalAccessException
maxKEstimationAux
in class AbstractBucketSorter<O extends OBLong,BucketObjectLong<O extends OBLong>,OBQueryLong<O extends OBLong>,SleekBucketLong<O extends OBLong>,SketchProjection,CBitVector>
object
-
OBException
InstantiationException
IllegalAccessException
protected double distance(O a, O b) throws OBException
distance
in class AbstractOBIndex<O extends OBLong>
OBException
protected int getCPSize()
AbstractBucketSorter
getCPSize
in class AbstractBucketSorter<O extends OBLong,BucketObjectLong<O extends OBLong>,OBQueryLong<O extends OBLong>,SleekBucketLong<O extends OBLong>,SketchProjection,CBitVector>
protected Class<CBitVector> getPInstance()
getPInstance
in class AbstractBucketSorter<O extends OBLong,BucketObjectLong<O extends OBLong>,OBQueryLong<O extends OBLong>,SleekBucketLong<O extends OBLong>,SketchProjection,CBitVector>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |