|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object IndexManager.WindsurfRegMtreeWrapper
public class WindsurfRegMtreeWrapper
Class implementing operations for invoking native functions for managing the region M-tree.
Constructor Summary | |
---|---|
WindsurfRegMtreeWrapper()
|
Method Summary | |
---|---|
static boolean |
close()
Closes the region M-tree. |
static boolean |
closeCursors()
Deletes the previously created region cursors for sorted access. |
static boolean |
create(java.lang.String featureFile)
Creates a new M-tree index from a file containing region features. |
static boolean |
createCursors(int id,
int size,
int regions,
double[] sizes,
double[] centroids,
double[] covariance)
Creates cursors for performing sorted access on the index using all the regions of a given image. |
static boolean |
delete(int id,
int size,
double[] centroid,
double[] covariance)
Deletes a region from the M-tree index. |
static int |
getCount()
Gets the distance counter for the region index. |
static double[] |
getNext(int index)
Performs a sorted access on one of the existing region cursors. |
static boolean |
init(java.lang.String indexFile)
Initializes the region M-tree. |
static boolean |
insert(int id,
int size,
double[] centroid,
double[] covariance)
Inserts a new region in the M-tree index. |
static double[] |
queryKnn(int k,
int size,
double[] centroid,
double[] covariance)
Creates a new k-NN query based on the given region using this index. |
static double[] |
queryRange(double r,
int size,
double[] centroid,
double[] covariance)
Creates a new range query based on the given region using this index. |
static boolean |
resetCount()
Resets the distance counter for the region index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WindsurfRegMtreeWrapper()
Method Detail |
---|
public static boolean init(java.lang.String indexFile)
indexFile
- Absolute path of the file containing the M-tree index.
true
if the index was successfully initialized, false
otherwise.public static boolean create(java.lang.String featureFile)
featureFile
- Absolute path of the features file.
true
if the index was successfully created, false
otherwise.public static boolean close()
true
if the index was successfully closed, false
otherwise.public static boolean insert(int id, int size, double[] centroid, double[] covariance)
id
- Region ID.size
- Number of pixels in the region.centroid
- Region centroid.covariance
- Region covariance matrix.
true
if the region was successfully inserted, false
otherwise.public static boolean delete(int id, int size, double[] centroid, double[] covariance)
id
- Region ID.size
- Number of pixels in the region.centroid
- Region centroid.covariance
- Region covariance matrix.
true
if the region was successfully deleted, false
otherwise.public static double[] queryKnn(int k, int size, double[] centroid, double[] covariance)
k
- Number of requested results.size
- Number of pixels in the region.centroid
- Region centroid.covariance
- Region covariance matrix.
public static double[] queryRange(double r, int size, double[] centroid, double[] covariance)
r
- Radius of the query.size
- Number of pixels in the region.centroid
- Region centroid.covariance
- Region covariance matrix.
public static boolean createCursors(int id, int size, int regions, double[] sizes, double[] centroids, double[] covariance)
id
- Image ID.size
- Number of pixels in the image.regions
- Number of image regions.sizes
- Array of regions sizes.centroids
- Array of regions centroids.covariance
- Array of regions covariance matrices.
true
if the cursors were successfully created, false
otherwise.public static boolean closeCursors()
true
if the cursors were successfully deleted, false
otherwise.public static double[] getNext(int index)
index
- The cursor that should perform the sorted access.
public static boolean resetCount()
true
if the counter was successfully reset, false
otherwise.public static int getCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |