Interface AxisSplitter<P>

All Known Implementing Classes:
AxisSplitterMedian

public interface AxisSplitter<P>
Selects which dimension the set of points should be split by, which point is used to split the lists, and splits the lists into two sets. A point goes into the left list if it has a value less than the split point and to the right list if it has a value higher than. The split point goes into neither list. If multiple points have the same value and one of them is the split point then all but one go into the left or right list.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Number of elements in a point
    int
    The axis/dimension that the input list was split on
    int
    Index associated with the split point
    Returns the point used to split the data
    void
    splitData(List<P> points, @Nullable DogArray_I32 indexes, List<P> left, @Nullable DogArray_I32 leftIndexes, List<P> right, @Nullable DogArray_I32 righrIndexes)
    Given the a set of points, select the axis to split the data along and select a point to divide the data.
  • Method Details

    • splitData

      void splitData(List<P> points, @Nullable @Nullable DogArray_I32 indexes, List<P> left, @Nullable @Nullable DogArray_I32 leftIndexes, List<P> right, @Nullable @Nullable DogArray_I32 righrIndexes)
      Given the a set of points, select the axis to split the data along and select a point to divide the data. Points whput items below the threshold into left and above into right. Data is optional and should be ignored if null. The selected
      Parameters:
      points - Input: Set of points.
      indexes - Input: (Optional) Option index asssociated with points. Can be null.
      left - Output: Storage for points less than the split point.
      leftIndexes - Output: (Optional) Storage for indexes associated with left. Can be null.
      right - Output: Storage for points more than the split point.
      righrIndexes - Output: (Optional) Storage for indexes associated with right. Can be null.
    • getSplitPoint

      P getSplitPoint()
      Returns the point used to split the data
    • getSplitIndex

      int getSplitIndex()
      Index associated with the split point
    • getSplitAxis

      int getSplitAxis()
      The axis/dimension that the input list was split on
    • getPointLength

      int getPointLength()
      Number of elements in a point