org.gcube.indexmanagement.featureindexlibrary.fullscan
Class FullVectorScan

java.lang.Object
  extended by org.gcube.indexmanagement.featureindexlibrary.fullscan.FullVectorScan
All Implemented Interfaces:
FeatureIndex

public class FullVectorScan
extends Object
implements FeatureIndex

The Full scan index

Author:
UoA

Constructor Summary
FullVectorScan(FullScanParams charact)
          Creates a new index
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullVectorScan

public FullVectorScan(FullScanParams charact)
               throws Exception
Creates a new index

Parameters:
charact - the head params
Throws:
Exception - An error
Method Detail

getNumberOfElements

public long getNumberOfElements()
Description copied from interface: FeatureIndex
Retrieves the number of elements in the index

Specified by:
getNumberOfElements in interface FeatureIndex
Returns:
the number of elements
See Also:
FeatureIndex.getNumberOfElements()

addFeatureVector

public void addFeatureVector(FeatureVectorElement elem)
                      throws Exception
Description copied from interface: FeatureIndex
Adds a new element

Specified by:
addFeatureVector in interface FeatureIndex
Parameters:
elem - The element to add
Throws:
Exception - an error
See Also:
FeatureIndex.addFeatureVector(org.gcube.indexmanagement.featureindexlibrary.commons.FeatureVectorElement)

addFeatureVector

public void addFeatureVector(FeatureVectorElement[] elem)
                      throws Exception
Description copied from interface: FeatureIndex
Adds new elements

Specified by:
addFeatureVector in interface FeatureIndex
Parameters:
elem - the elements to add
Throws:
Exception - an error
See Also:
FeatureIndex.addFeatureVector(org.gcube.indexmanagement.featureindexlibrary.commons.FeatureVectorElement[])

commit

public void commit()
            throws Exception
Description copied from interface: FeatureIndex
Commits additions

Specified by:
commit in interface FeatureIndex
Throws:
Exception - an error
See Also:
FeatureIndex.commit()

lookup

public ArrayList<RankedResultElement> lookup(float[] vector,
                                             int k)
                                      throws Exception
Description copied from interface: FeatureIndex
Performs a lookup with default parameter values

Specified by:
lookup in interface FeatureIndex
Parameters:
vector - the vectror to search for
k - the number of results
Returns:
the results
Throws:
Exception - an error
See Also:
FeatureIndex.lookup(float[], int)

lookup

public ArrayList<RankedResultElement> lookup(float[] vector,
                                             int k,
                                             LookupParams params)
                                      throws Exception
Description copied from interface: FeatureIndex
Performs a lookup with default parameter values

Specified by:
lookup in interface FeatureIndex
Parameters:
vector - the vectror to search for
k - the number of results
params - lookup parameters
Returns:
the results
Throws:
Exception - an error
See Also:
FeatureIndex.lookup(float[], int, org.gcube.indexmanagement.featureindexlibrary.commons.LookupParams)

removeEntry

public void removeEntry(String id)
                 throws Exception
Description copied from interface: FeatureIndex
Removes the record from the index

Specified by:
removeEntry in interface FeatureIndex
Parameters:
id - the id to remove
Throws:
Exception - an error
See Also:
FeatureIndex.removeEntry(java.lang.String)

getIndexID

public String getIndexID()
                  throws Exception
Returns the index id of the index instance

Specified by:
getIndexID in interface FeatureIndex
Returns:
The index ID
Throws:
Exception - An unrecoverable for the operation error occured
See Also:
FeatureIndex.getIndexID()


Copyright © 2012. All Rights Reserved.