net.obsearch.index.perm
Class AbstractDistPerm<O extends OB,B extends BucketObject<O>,Q,BC extends BucketContainer<O,B,Q>>
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,PermProjection,CompactPerm>
net.obsearch.index.perm.AbstractDistPerm<O,B,Q,BC>
- All Implemented Interfaces:
- Index<O>
- Direct Known Subclasses:
- DistPermByte, DistPermDouble, DistPermFloat, DistPermInt, DistPermLong, DistPermShort
public abstract class AbstractDistPerm<O extends OB,B extends BucketObject<O>,Q,BC extends BucketContainer<O,B,Q>>
- extends AbstractBucketSorter<O,B,Q,BC,PermProjection,CompactPerm>
Methods inherited from class net.obsearch.index.sorter.AbstractBucketSorter |
bucketStats, calculateEstimators, close, estimateK, freezeDefault, getAddress, getAllObjects, getBucketContainer, getBucketPivotCount, getCPSize, getExpectedEP, getKQuery, getMaxK, getPInstance, getProjection, init, initByteArrayBuckets, initCache, insertBucket, insertBucketBulk, loadMasks, maxKEstimation, maxKEstimationAux, printEstimation, searchBuckets, setExpectedError, setKAlpha, setMaxK, setSampleSize |
Methods inherited from class net.obsearch.index.bucket.AbstractBucketIndex |
debug, deleteAux, exists, getBucket, getBuckets, getObjectFreeze, idMap, insertAux, insertAuxBulk, instantiateBucketContainer, iterateBuckets, primitiveDataTypeSize |
Methods inherited from class net.obsearch.index.AbstractOBIndex |
assertFrozen, bytesToObject, bytesToObject, clearACache, databaseSize, delete, distance, 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 |
AbstractDistPerm
public AbstractDistPerm(Class<O> type,
IncrementalPivotSelector<O> pivotSelector,
int pivotCount,
int bucketPivotCount)
throws OBStorageException,
OBException
- Throws:
OBStorageException
OBException
compactRepresentationToBytes
protected byte[] compactRepresentationToBytes(CompactPerm cp)
- Specified by:
compactRepresentationToBytes
in class AbstractBucketSorter<O extends OB,B extends BucketObject<O>,Q,BC extends BucketContainer<O,B,Q>,PermProjection,CompactPerm>
bytesToCompactRepresentation
protected CompactPerm bytesToCompactRepresentation(byte[] data)
- Specified by:
bytesToCompactRepresentation
in class AbstractBucketSorter<O extends OB,B extends BucketObject<O>,Q,BC extends BucketContainer<O,B,Q>,PermProjection,CompactPerm>
updateDistance
protected void updateDistance(PermProjection query,
CompactPerm proj,
FixedPriorityQueue<PermProjection> queue)
- Description copied from class:
AbstractBucketSorter
- Calculates the distance between a query and some projection
- Specified by:
updateDistance
in class AbstractBucketSorter<O extends OB,B extends BucketObject<O>,Q,BC extends BucketContainer<O,B,Q>,PermProjection,CompactPerm>
convertLongToBytesAddress
protected byte[] convertLongToBytesAddress(long bucketId)
freeze
public void freeze()
throws AlreadyFrozenException,
IllegalIdException,
OutOfRangeException,
IllegalAccessException,
InstantiationException,
OBException,
PivotsUnavailableException,
IOException
- Description copied from interface:
Index
- Freezes the index. From this point data can be inserted, searched and
deleted. The index might deteriorate at some point so every once in a
while it is a good idea to rebuild the index. A PivotSelector must be
executed before calling this method.
- Specified by:
freeze
in interface Index<O extends OB>
- Overrides:
freeze
in class AbstractPivotOBIndex<O extends OB>
- Throws:
AlreadyFrozenException
- If the index was already frozen and the user attempted to
freeze it again
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
OutOfRangeException
- If the distance of any object to any other object exceeds
the range defined by the user.
IllegalAccessException
- If there is a problem when instantiating objects O
InstantiationException
- If there is a problem when instantiating objects O
OBStorageException
- If something goes wrong with the DB
OBException
- User generated exception
PivotsUnavailableException
IOException
- if the index serialization process fails- See Also:
Index.freeze()
Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.