MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.opt.index
Interface Index

All Known Implementing Classes:
IndexImpl

public interface Index


Method Summary
 void clear()
           
 void compileIndex()
           
 int get()
          Returns the min value
 int get(int i)
          Returns the value at position
 int[] getAll()
           
 int getAndRemove()
          Returns the min value and removes it
 int getAndRemove(int i)
           
 int[] getAndRemoveAll()
           
 java.util.Vector getGroups(IndexSchema schema)
           
 java.util.Vector getValues(IndexSchema schema)
           
 void index(IndexSchema index, Token[][] indexValues, int value)
          Like a simple value index but for general comparisons
 void index(IndexSchema index, Token[] indexValues, int value)
           
 void index(int value)
          Indexes the value without indexValues :-)
 boolean registerIndex(IndexSchema index)
          Registered a new Index.
 void remove(int value)
          Returns the first value
 IntegerList retreive(IndexSchema index, Token[] indexValues)
           
 IntegerList retreive(IndexSchema index, Token[][] indexValues)
          Like a simple value index but for general comparisons
 IntegerList retreiveAndRemove(IndexSchema index, Token[] indexValues)
           
 IntegerList retreiveAndRemove(IndexSchema index, Token[][] indexValues)
           
 int size()
          Gets the number of elements in the index
 

Method Detail

registerIndex

boolean registerIndex(IndexSchema index)
Registered a new Index.

Parameters:
index - the index schema
Returns:
If the Regestration was successfull

compileIndex

void compileIndex()

index

void index(int value)
Indexes the value without indexValues :-)

Parameters:
value - >= 0

index

void index(IndexSchema index,
           Token[] indexValues,
           int value)
Parameters:
index -
indexValues -
value - >= 0

index

void index(IndexSchema index,
           Token[][] indexValues,
           int value)
Like a simple value index but for general comparisons

Parameters:
index -
indexValues -
value - >= 0

retreive

IntegerList retreive(IndexSchema index,
                     Token[] indexValues)
                     throws MXQueryException
Parameters:
index -
indexValues -
Returns:
Returns -1 if no window is found
Throws:
MXQueryException

retreiveAndRemove

IntegerList retreiveAndRemove(IndexSchema index,
                              Token[] indexValues)
                              throws MXQueryException
Throws:
MXQueryException

retreive

IntegerList retreive(IndexSchema index,
                     Token[][] indexValues)
                     throws MXQueryException
Like a simple value index but for general comparisons

Parameters:
index -
indexValues -
Returns:
the list of matches, -1 if not found
Throws:
MXQueryException

retreiveAndRemove

IntegerList retreiveAndRemove(IndexSchema index,
                              Token[][] indexValues)
                              throws MXQueryException
Throws:
MXQueryException

getAll

int[] getAll()

getAndRemoveAll

int[] getAndRemoveAll()

get

int get()
Returns the min value

Returns:
the minimal value

get

int get(int i)
Returns the value at position

Parameters:
i -
Returns:
the value at i

getAndRemove

int getAndRemove(int i)

remove

void remove(int value)
Returns the first value

Parameters:
value -

getAndRemove

int getAndRemove()
Returns the min value and removes it

Returns:
the value

size

int size()
Gets the number of elements in the index

Returns:
the number of elements

clear

void clear()

getGroups

java.util.Vector getGroups(IndexSchema schema)

getValues

java.util.Vector getValues(IndexSchema schema)

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich