public class SequentialScan extends Algorithm
Algorithm.AlgorithmConstructor
Modifier and Type | Field and Description |
---|---|
protected LocalBucket |
bucket
One instance of bucket where all objects are stored
|
protected boolean |
pivotDistsValidIfGiven
Flag controlling the usage of PrecomputedDistancesFixedArrayFilter -- whether distances are set or appended (see the constructor below for details)
|
protected AbstractObjectList<LocalAbstractObject> |
pivots
A list of fixed pivots used for filtering
|
log, maximalConcurrentOperations
Constructor and Description |
---|
SequentialScan()
Creates a new instance of SequantialScan access structure with the default MemoryStorageBucket class.
|
SequentialScan(java.lang.Class<? extends LocalBucket> bucketClass)
Creates a new instance of SequantialScan access structure with specific bucket class.
|
SequentialScan(java.lang.Class<? extends LocalBucket> bucketClass,
AbstractObjectIterator<LocalAbstractObject> pivotIter,
int pivotCount,
boolean pivotDistsValidIfGiven)
Creates a new instance of SequantialScan access structure with specific bucket class and filtering pivots.
|
SequentialScan(java.lang.Class<? extends LocalBucket> bucketClass,
java.util.Map<java.lang.String,java.lang.Object> bucketClassParams)
Creates a new instance of SequantialScan access structure with specific bucket class.
|
SequentialScan(java.lang.Class<? extends LocalBucket> bucketClass,
java.util.Map<java.lang.String,java.lang.Object> bucketClassParams,
AbstractObjectIterator<LocalAbstractObject> pivotIter,
int pivotCount,
boolean pivotDistsValidIfGiven)
Creates a new instance of SequantialScan access structure with specific bucket class and filtering pivots.
|
SequentialScan(LocalBucket bucket)
Creates a new instance of SequantialScan access structure with the given bucket.
|
SequentialScan(LocalBucket bucket,
AbstractObjectIterator<LocalAbstractObject> pivotIter,
int pivotCount,
boolean pivotDistsValidIfGiven)
Creates a new instance of SequantialScan access structure with the given bucket and filtering pivots.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPrecompDist(LocalAbstractObject object)
Add precomputed distances to a given object.
|
void |
algorithmInfo(GetAlgorithmInfoOperation operation)
Method for processing
GetAlgorithmInfoOperation . |
void |
bulkInsert(BulkInsertOperation operation)
Bulk insertion.
|
void |
delete(DeleteByLocatorOperation operation)
Deletes objects by locators.
|
void |
delete(DeleteOperation operation)
Deletes an object.
|
void |
destroy()
Destroy this algorithm.
|
void |
finalize()
Finalize the algorithm.
|
void |
insert(InsertOperation operation)
Inserts a new object.
|
void |
objectCount(GetObjectCountOperation operation)
Method for processing
GetObjectCountOperation . |
void |
search(QueryOperation<?> operation)
Performs a generic query operation.
|
void |
singleQueryObjectSearch(RankingSingleQueryOperation operation)
Evaluates a ranking single query object operation on this algorithm.
|
java.lang.String |
toString()
Converts the object to a string representation
|
afterStoreToFile, backgroundExecuteOperation, backgroundExecuteOperationIndependent, backgroundExecuteOperationWithStatistics, beforeStoreToFile, createBackgroundExecutionCallable, execute, executeMethodWithStringArguments, executeOperation, executeUsingNavDir, getAllRunningOperations, getAnnotatedConstructors, getAnnotatedConstructorsArray, getConstructorArgumentDescriptions, getConstructorDescription, getConstructorDescriptionSimple, getExecutorParamClasses, getFirstSupportedOperation, getName, getObjectClass, getObjectCount, getOperationStatistics, getOperationsThreadPool, getOperationSubClasses, getQueryAnswer, getQueryAnswer, getRunningOperationById, getRunningOperationsCount, getSupportedOperations, getSupportedOperations, methodExecute, resetOperationStatistics, restoreFromFile, restoreFromFile, setExecutedOperationsLogVerbosity, setOperationsThreadPool, setupStatsAndExecuteOperation, statisticsAfterOperation, statisticsBeforeOperation, storeToFile, terminateOperation, terminateOperation, waitBackgroundExecution
protected final LocalBucket bucket
protected final AbstractObjectList<LocalAbstractObject> pivots
protected final boolean pivotDistsValidIfGiven
public SequentialScan(LocalBucket bucket, AbstractObjectIterator<LocalAbstractObject> pivotIter, int pivotCount, boolean pivotDistsValidIfGiven)
bucket
- the bucket used for the sequential scanpivotIter
- the iterator from which the fixed pivots will be readpivotCount
- the number of pivots to read from the iteratorpivotDistsValidIfGiven
- the flag which controls whether the already associated distances to pivots with new objects are valid or not; if so, they are used without computing and storing them againpublic SequentialScan(LocalBucket bucket)
bucket
- the bucket used for the sequential scanpublic SequentialScan(java.lang.Class<? extends LocalBucket> bucketClass, java.util.Map<java.lang.String,java.lang.Object> bucketClassParams, AbstractObjectIterator<LocalAbstractObject> pivotIter, int pivotCount, boolean pivotDistsValidIfGiven) throws CapacityFullException, java.lang.InstantiationException
bucketClass
- the class of the storage bucketbucketClassParams
- additional parameters for the bucket class constructor in the name->value formpivotIter
- the iterator from which the fixed pivots will be readpivotCount
- the number of pivots to read from the iteratorpivotDistsValidIfGiven
- the flag which controls whether the already associated distances to pivots with new objects are valid or not; if so, they are used without computing and storing them againCapacityFullException
- if the maximal number of buckets is already allocatedjava.lang.InstantiationException
- if public SequentialScan(java.lang.Class<? extends LocalBucket> bucketClass, AbstractObjectIterator<LocalAbstractObject> pivotIter, int pivotCount, boolean pivotDistsValidIfGiven) throws CapacityFullException, java.lang.InstantiationException
bucketClass
- The class of the storage bucketpivotIter
- The iterator from which the fixed pivots will be readpivotCount
- The number of pivots to read from the iteratorpivotDistsValidIfGiven
- The flag which controls whether the already associated distances to pivots with new objects are valid or not. If so, they are used without computing and storing them again.CapacityFullException
- if the maximal number of buckets is already allocatedjava.lang.InstantiationException
- if public SequentialScan(java.lang.Class<? extends LocalBucket> bucketClass, java.util.Map<java.lang.String,java.lang.Object> bucketClassParams) throws CapacityFullException, java.lang.InstantiationException
bucketClass
- The class of the storage bucketbucketClassParams
- additional parameters for the bucket class constructor in the name->value formCapacityFullException
- if the maximal number of buckets is already allocatedjava.lang.InstantiationException
- if public SequentialScan(java.lang.Class<? extends LocalBucket> bucketClass) throws CapacityFullException, java.lang.InstantiationException
bucketClass
- The class of the storage bucketCapacityFullException
- if the maximal number of buckets is already allocatedjava.lang.InstantiationException
- if public SequentialScan() throws CapacityFullException, java.lang.InstantiationException
CapacityFullException
- if the maximal number of buckets is already allocatedjava.lang.InstantiationException
- if protected void addPrecompDist(LocalAbstractObject object)
PrecomputedDistancesFixedArrayFilter
.object
- the object to add the distances topublic void finalize() throws java.lang.Throwable
Algorithm
public void destroy() throws java.lang.Throwable
Algorithm
This implementation defaults to call Algorithm.finalize()
, but should be overridden
if the algorithm needs to differentiate between finalizing and destroying. In that case
the "super.destroy()" should not be called if finalizing is not part of destroy.
public void algorithmInfo(GetAlgorithmInfoOperation operation)
GetAlgorithmInfoOperation
.
The processing will fill the algorithm info with this
algorithm toString()
value.operation
- the operation to processpublic void objectCount(GetObjectCountOperation operation)
GetObjectCountOperation
.
The processing will fill the operation with the number of objects
stored in this algorithm.operation
- the operation to processpublic void insert(InsertOperation operation) throws CapacityFullException
operation
- Operation of insert which carries the object to be inserted.CapacityFullException
- if the hard capacity of the bucket is exceededpublic void bulkInsert(BulkInsertOperation operation) throws BucketStorageException
operation
- The operation of bulk insert which carries the objects to be inserted.BucketStorageException
- if the hard capacity of the bucket is exceededpublic void delete(DeleteOperation operation) throws BucketStorageException
operation
- The operation which specifies the object to be deleted.BucketStorageException
- if the low occupation limit is reached when deleting objectpublic void delete(DeleteByLocatorOperation operation) throws BucketStorageException
operation
- the operation which specifies the locators of objects to be deletedBucketStorageException
- if the low occupation limit is reached when deleting objectpublic void singleQueryObjectSearch(RankingSingleQueryOperation operation)
operation
- the operation to evaluatepublic void search(QueryOperation<?> operation) throws java.lang.CloneNotSupportedException, java.lang.InterruptedException
operation
- the query operation which is to be executed and which will received the result list.java.lang.CloneNotSupportedException
- if the operation does not support cloning (and thus cannot be used in parallel)java.lang.InterruptedException
- if the processing thread was interrupted during processingpublic java.lang.String toString()
toString
in class java.lang.Object