com.rapidminer.tools.math.container
Interface GeometricDataCollection<T extends java.io.Serializable>

Type Parameters:
T - The type of the values stored within each point in data space
All Superinterfaces:
java.lang.Iterable<T>, java.io.Serializable
All Known Implementing Classes:
BallTree, KDTree, LinearList

public interface GeometricDataCollection<T extends java.io.Serializable>
extends java.io.Serializable, java.lang.Iterable<T>

This interface provides the methods for multidimensional data structures providing efficient search in data space for the next k neighbors and its distances, or the next neighbors in a specified distance. Also a mixed mode with distance but at least as many is supported.

Author:
Sebastian Land

Method Summary
 void add(double[] values, T storeValue)
          This method has to be called in order to insert new values into the data structure
 T get(int index)
          This returns the index-th value added to this collection.
 java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(double withinDistance, double[] values)
          This method returns a collection of data from all sample points inside the specified distance.
 java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(double withinDistance, int butAtLeastK, double[] values)
          This method returns a collection of data from all sample points inside the specified distance but at least k points.
 java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(int k, double[] values)
          This method returns a collection of data from the k nearest sample points.
 java.util.Collection<T> getNearestValues(int k, double[] values)
          This method returns a collection of the stored data values from the k nearest sample points.
 int size()
          This method has to return the number of stored data points.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

add

void add(double[] values,
         T storeValue)
This method has to be called in order to insert new values into the data structure

Parameters:
values - specifies the geometric coordinates in data space
storeValue - specifies the value at the given point

getNearestValues

java.util.Collection<T> getNearestValues(int k,
                                         double[] values)
This method returns a collection of the stored data values from the k nearest sample points.

Parameters:
k - the number of neighbours
values - the coordinate of the querry point in the sample dimension

getNearestValueDistances

java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(int k,
                                                                         double[] values)
This method returns a collection of data from the k nearest sample points. This collection consists of Tupels containing the distance from querrypoint to the samplepoint and in the second component the contained value of the sample point.

Parameters:
k - the number of neighbours
values - the coordinate of the querry point in the sample dimension

getNearestValueDistances

java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(double withinDistance,
                                                                         double[] values)
This method returns a collection of data from all sample points inside the specified distance. This collection consists of Tupels containing the distance from querrypoint to the samplepoint and in the second component the contained value of the sample point.

Parameters:
values - the coordinate of the querry point in the sample dimension

getNearestValueDistances

java.util.Collection<Tupel<java.lang.Double,T>> getNearestValueDistances(double withinDistance,
                                                                         int butAtLeastK,
                                                                         double[] values)
This method returns a collection of data from all sample points inside the specified distance but at least k points. So the distance might be enlarged if density is to low. This collection consists of Tupels containing the distance from querrypoint to the samplepoint and in the second component the contained value of the sample point.

Parameters:
values - the coordinate of the querry point in the sample dimension

size

int size()
This method has to return the number of stored data points.


get

T get(int index)
This returns the index-th value added to this collection.



Copyright © 2001-2009 by Rapid-I