java.lang.Object
kieker.analysis.generic.clustering.mtree.query.Query<T>
Type Parameters:
T - data type of the values in the query result
All Implemented Interfaces:
Iterable<ResultItem<T>>

public final class Query<T> extends Object implements Iterable<ResultItem<T>>
An Iterable class which can be iterated to fetch the results of a nearest-neighbors query.

The neighbors are presented in non-decreasing order from the queryData argument to the getNearest*() call.

The query on the M-Tree is executed during the iteration, as the results are fetched. It means that, by the time when the n-th result is fetched, the next result may still not be known, and the resources allocated were only the necessary to identify the n first results.

Since:
2.0.0
Author:
Eduardo R. D'Avila
  • Constructor Details

    • Query

      public Query(MTree<T> mtree, T data, double range, int limit)
  • Method Details

    • iterator

      public Iterator<ResultItem<T>> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • getData

      public T getData()
    • getLimit

      public int getLimit()
    • getRange

      public double getRange()
    • getMTree

      public MTree<T> getMTree()