public class FullVectorScan extends Object implements FeatureIndex
| Constructor and Description |
|---|
FullVectorScan(FullScanParams charact)
Creates a new index
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFeatureVector(FeatureVectorElement elem)
Adds a new element
|
void |
addFeatureVector(FeatureVectorElement[] elem)
Adds new elements
|
void |
commit()
Commits additions
|
String |
getIndexID()
Returns the index id of the index instance
|
long |
getNumberOfElements()
Retrieves the number of elements in the index
|
ArrayList<RankedResultElement> |
lookup(float[] vector,
int k)
Performs a lookup with default parameter values
|
ArrayList<RankedResultElement> |
lookup(float[] vector,
int k,
LookupParams params)
Performs a lookup with default parameter values
|
void |
removeEntry(String id)
Removes the record from the index
|
public FullVectorScan(FullScanParams charact) throws Exception
charact - the head paramsException - An errorpublic long getNumberOfElements()
FeatureIndexgetNumberOfElements in interface FeatureIndexFeatureIndex.getNumberOfElements()public void addFeatureVector(FeatureVectorElement elem) throws Exception
FeatureIndexaddFeatureVector in interface FeatureIndexelem - The element to addException - an errorFeatureIndex.addFeatureVector(org.gcube.indexmanagement.featureindexlibrary.commons.FeatureVectorElement)public void addFeatureVector(FeatureVectorElement[] elem) throws Exception
FeatureIndexaddFeatureVector in interface FeatureIndexelem - the elements to addException - an errorFeatureIndex.addFeatureVector(org.gcube.indexmanagement.featureindexlibrary.commons.FeatureVectorElement[])public void commit()
throws Exception
FeatureIndexcommit in interface FeatureIndexException - an errorFeatureIndex.commit()public ArrayList<RankedResultElement> lookup(float[] vector, int k) throws Exception
FeatureIndexlookup in interface FeatureIndexvector - the vectror to search fork - the number of resultsException - an errorFeatureIndex.lookup(float[], int)public ArrayList<RankedResultElement> lookup(float[] vector, int k, LookupParams params) throws Exception
FeatureIndexlookup in interface FeatureIndexvector - the vectror to search fork - the number of resultsparams - lookup parametersException - an errorFeatureIndex.lookup(float[], int, org.gcube.indexmanagement.featureindexlibrary.commons.LookupParams)public void removeEntry(String id) throws Exception
FeatureIndexremoveEntry in interface FeatureIndexid - the id to removeException - an errorFeatureIndex.removeEntry(java.lang.String)public String getIndexID() throws Exception
getIndexID in interface FeatureIndexException - An unrecoverable for the operation error occuredFeatureIndex.getIndexID()Copyright © 2014. All Rights Reserved.