org.ddogleg.nn.alg
Class KdTreeConstructor<D>
- java.lang.Object
-
- org.ddogleg.nn.alg.KdTreeConstructor<D>
-
public class KdTreeConstructor<D> extends java.lang.ObjectCreates a newKD-Treefrom a list of points and (optional) associated data. Which axis is used to split the data and how to split the data is determined by theAxisSplitterpassed in. A child node can be null if it is a leaf and there was no data in that direction. WARNING: A reference to the input points is saved. Do not modify the input until the K-D Tree is no longer needed. This reduced memory overhead significantly.
-
-
Constructor Summary
Constructors Constructor and Description KdTreeConstructor(int N)Creates canonical K-D Tree by selecting the maximum variance axis and splitting the points at the median.KdTreeConstructor(KdTreeMemory memory, int N, AxisSplitter<D> splitter)Constructor which allows for maximum configurable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description KdTreeconstruct(java.util.List<double[]> points, java.util.List<D> data)Creates a newKdTreefrom the provided points.
-
-
-
Constructor Detail
-
KdTreeConstructor
public KdTreeConstructor(KdTreeMemory memory, int N, AxisSplitter<D> splitter)
Constructor which allows for maximum configurable.- Parameters:
memory- Used to recycle dataN- Number of elements/axes in each data point
-
KdTreeConstructor
public KdTreeConstructor(int N)
Creates canonical K-D Tree by selecting the maximum variance axis and splitting the points at the median.- Parameters:
N- N Number of elements/axes in each data point
-
-
Method Detail
-
construct
public KdTree construct(java.util.List<double[]> points, java.util.List<D> data)
Creates a newKdTreefrom the provided points. WARNING: Reference to each point is saved to reduce memory usage..- Parameters:
points- Data points.data- (Optional) Data associated to each point. Can be null.- Returns:
- KdTre
-
-
DataMelt 3.0 © DataMelt by jWork.ORG