index.base
Class AIndexStructure

java.lang.Object
  extended by index.base.AIndexStructure

public abstract class AIndexStructure
extends java.lang.Object

This is the super class of all index structures. An example for the implementation of further structures is given in the class index.structures.IndexExample.


Field Summary
protected  int dim
          Dimension of the points within the data set.
protected  int maxValue
          Maximum value within the dimensions.
protected  int minValue
          Minimum value within the dimensions.
protected  int size
          Size of the given data set.
 
Constructor Summary
protected AIndexStructure(int _size, int _dim, int _minValue, int _maxValue, java.util.HashMap<java.lang.String,java.lang.String> _map)
          This is the default constructor of the index structures.
 
Method Summary
abstract  boolean canKNNSearch()
          Whether the index structure supports kNN queries or not.
abstract  void clear()
          This method is for cleaning up the state of the current used instance of the the index structure.
abstract  java.lang.String getInformations()
          This method returns the name of the index structure and some additional informations, necessary for an unique identification of the index structure.
abstract  java.lang.String getName()
          This method returns the name of the index structure.
protected abstract  testapp.JDialog_IndexStrOption getOptionsDialog(javax.swing.JFrame _parent)
          This method returns the index structure specific dialog for setting the parameters.
 void initParameter(java.util.HashMap<java.lang.String,java.lang.String> _map)
          This method is used to set the index structure specific parameters.
protected abstract  boolean insert(int[] _dataset)
          This method is for indexing one data item within the index structure.
abstract  int[] search(int[] _datasetToSearch)
          This method is for answering exact match queries.
abstract  int[][] searchKNN(int[] _datasetToSearch, int _k)
          This method is for answering kNN queries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

protected int size
Size of the given data set.


dim

protected int dim
Dimension of the points within the data set.


minValue

protected int minValue
Minimum value within the dimensions.


maxValue

protected int maxValue
Maximum value within the dimensions.

Constructor Detail

AIndexStructure

protected AIndexStructure(int _size,
                          int _dim,
                          int _minValue,
                          int _maxValue,
                          java.util.HashMap<java.lang.String,java.lang.String> _map)
This is the default constructor of the index structures.

Parameters:
_size - Size of the data set.
_dim - Dimension of the points within the data set.
_minValue - Minimum value within the dimensions.
_maxValue - Maximum value within the dimensions.
_map - HashMap for index structure specific parameters.
Method Detail

initParameter

public void initParameter(java.util.HashMap<java.lang.String,java.lang.String> _map)
This method is used to set the index structure specific parameters. Call this method as the first statement within the constructor.

Parameters:
_map - The HashMap given by the constructor.

insert

protected abstract boolean insert(int[] _dataset)
This method is for indexing one data item within the index structure.

Parameters:
_dataset - Data item to index.
Returns:
insertion successful?

search

public abstract int[] search(int[] _datasetToSearch)
This method is for answering exact match queries.

Parameters:
_datasetToSearch - The given data item.
Returns:
The given data item. If the given data item is not indexed, this method have to return null.

searchKNN

public abstract int[][] searchKNN(int[] _datasetToSearch,
                                  int _k)
This method is for answering kNN queries. It is not necessary to return an ordered result set.

Parameters:
_datasetToSearch - The given data item.
_k - The number of points to return.
Returns:
Return the k nearest points of the given point.

canKNNSearch

public abstract boolean canKNNSearch()
Whether the index structure supports kNN queries or not.

Returns:
support of kNN queries?

getInformations

public abstract java.lang.String getInformations()
This method returns the name of the index structure and some additional informations, necessary for an unique identification of the index structure.

Returns:
Index structure name and additional informations.

getName

public abstract java.lang.String getName()
This method returns the name of the index structure.

Returns:
The name of the index structure.

clear

public abstract void clear()
This method is for cleaning up the state of the current used instance of the the index structure.


getOptionsDialog

protected abstract testapp.JDialog_IndexStrOption getOptionsDialog(javax.swing.JFrame _parent)
This method returns the index structure specific dialog for setting the parameters. See the code of class index.structures.IndexExample for further informations.

Parameters:
_parent - The JFrame of the Framework.