mtree.forest
Class ForestExecute

java.lang.Object
  extended by mtree.forest.ForestExecute

public class ForestExecute
extends java.lang.Object


Constructor Summary
ForestExecute()
           
 
Method Summary
static void insert(messif.algorithms.Algorithm alg, messif.objects.StreamGenericAbstractObjectIterator<messif.objects.LocalAbstractObject> objects, int objectCount)
          Inserts objects from the specified stream into algorithm.
static int kNN(messif.algorithms.Algorithm alg, messif.objects.StreamGenericAbstractObjectIterator<messif.objects.LocalAbstractObject> queries, int queryCount, int count)
          Executes the kNN query operation in a given algorithm.
static AbstractForest loadFromFile(java.lang.String file)
           
static void main(java.lang.String[] args)
           
static int rangeSearch(messif.algorithms.Algorithm alg, messif.objects.StreamGenericAbstractObjectIterator<messif.objects.LocalAbstractObject> queries, int queryCount, double radius)
          Executes the range query operation in a given algorithm.
static void saveToFile(messif.algorithms.Algorithm alg, java.lang.String file)
          Saves an algorithm into file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForestExecute

public ForestExecute()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.InstantiationException,
                        java.io.FileNotFoundException,
                        java.io.IOException,
                        java.lang.ClassNotFoundException,
                        messif.algorithms.AlgorithmMethodException
Throws:
java.lang.InstantiationException
java.io.FileNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
messif.algorithms.AlgorithmMethodException

insert

public static void insert(messif.algorithms.Algorithm alg,
                          messif.objects.StreamGenericAbstractObjectIterator<messif.objects.LocalAbstractObject> objects,
                          int objectCount)
Inserts objects from the specified stream into algorithm.


rangeSearch

public static int rangeSearch(messif.algorithms.Algorithm alg,
                              messif.objects.StreamGenericAbstractObjectIterator<messif.objects.LocalAbstractObject> queries,
                              int queryCount,
                              double radius)
Executes the range query operation in a given algorithm.

Returns:
Returns count of all answers sums over all queries.

kNN

public static int kNN(messif.algorithms.Algorithm alg,
                      messif.objects.StreamGenericAbstractObjectIterator<messif.objects.LocalAbstractObject> queries,
                      int queryCount,
                      int count)
Executes the kNN query operation in a given algorithm.

Returns:
Returns count of all answers sums over all queries.

saveToFile

public static void saveToFile(messif.algorithms.Algorithm alg,
                              java.lang.String file)
                       throws java.io.FileNotFoundException,
                              java.io.IOException
Saves an algorithm into file.

Throws:
java.io.FileNotFoundException
java.io.IOException

loadFromFile

public static AbstractForest loadFromFile(java.lang.String file)
                                   throws java.io.FileNotFoundException,
                                          java.io.IOException,
                                          java.lang.ClassNotFoundException
Returns:
Returns AbstractForest loaded from the specified file.
Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.ClassNotFoundException