Class KDTree.BoxNode<P extends Point<P>>

java.lang.Object
com.irurueta.geometry.Box<P>
com.irurueta.geometry.KDTree.BoxNode<P>
All Implemented Interfaces:
Serializable
Enclosing class:
KDTree<P extends Point<P>>

public static class KDTree.BoxNode<P extends Point<P>> extends Box<P>
Contains a node of a KD Tree.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    Position of 1st daughter node in the list of nodes of a tree.
    private int
    Position of 2nd daughter node of a tree.
    private final int
    Position of mother node in the list of nodes of a tree.
    private final int
    High index of list of points inside this box.
    private final int
    Low index of list of points inside this box.

    Fields inherited from class com.irurueta.geometry.Box

    hi, lo
  • Constructor Summary

    Constructors
    Constructor
    Description
    BoxNode(P lo, P hi, int mom, int d1, int d2, int ptLo, int ptHi)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets position of 1st daughter node in the list of nodes of a tree.
    int
    Gets position of 2nd daughter node of a tree.
    int
    Gets position of mother node in the list of nodes of a tree.
    int
    Gets high index of list of points inside this box.
    int
    Gets low index of list of points inside this box.
    void
    setBounds(P lo, P hi)
    Sets boundaries.
    void
    setHi(P hi)
    Sets high coordinate values.
    void
    setLo(P lo)
    Sets low coordinate values.

    Methods inherited from class com.irurueta.geometry.Box

    getDistance, getHi, getLo, getSqrDistance

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • mom

      private final int mom
      Position of mother node in the list of nodes of a tree.
    • dau1

      private int dau1
      Position of 1st daughter node in the list of nodes of a tree.
    • dau2

      private int dau2
      Position of 2nd daughter node of a tree.
    • ptLo

      private final int ptLo
      Low index of list of points inside this box. mPtLo and mPtHi define the range of points inside the box.
    • ptHi

      private final int ptHi
      High index of list of points inside this box. mPtLo and mPtHi define the range of points inside the box.
  • Constructor Details

    • BoxNode

      public BoxNode(P lo, P hi, int mom, int d1, int d2, int ptLo, int ptHi)
      Constructor.
      Parameters:
      lo - low coordinate values.
      hi - high coordinate values.
      mom - index of mother node.
      d1 - index of 1st daughter.
      d2 - index of 2nd daughter.
      ptLo - low index of list of points inside this box.
      ptHi - high index of list of points inside this box.
  • Method Details

    • getMom

      public int getMom()
      Gets position of mother node in the list of nodes of a tree.
      Returns:
      position of mother node in the list of nodes of a tree.
    • getDau1

      public int getDau1()
      Gets position of 1st daughter node in the list of nodes of a tree.
      Returns:
      position of 1st daughter node in the list of nodes of a tree.
    • getDau2

      public int getDau2()
      Gets position of 2nd daughter node of a tree.
      Returns:
      position of 2nd daughter node of a tree.
    • getPtLo

      public int getPtLo()
      Gets low index of list of points inside this box. getPtLo() and getPtHi() define the range of indices of points contained in this box.
      Returns:
      low index of list of points inside this box.
    • getPtHi

      public int getPtHi()
      Gets high index of list of points inside this box. getPtLo() and getPtHi() define the range of indices of points contained in this box.
      Returns:
      high index of list of points inside this box.
    • setLo

      public void setLo(P lo)
      Sets low coordinate values.
      Overrides:
      setLo in class Box<P extends Point<P>>
      Parameters:
      lo - low coordinate values.
      Throws:
      IllegalArgumentException - always thrown.
    • setHi

      public void setHi(P hi)
      Sets high coordinate values.
      Overrides:
      setHi in class Box<P extends Point<P>>
      Parameters:
      hi - high coordinate values.
      Throws:
      IllegalArgumentException - always thrown.
    • setBounds

      public void setBounds(P lo, P hi)
      Sets boundaries.
      Overrides:
      setBounds in class Box<P extends Point<P>>
      Parameters:
      lo - low coordinate values.
      hi - high coordinate values.
      Throws:
      IllegalArgumentException - always thrown.