Class KDTreePositions.Nested

java.lang.Object
net.imglib2.kdtree.KDTreePositions
net.imglib2.kdtree.KDTreePositions.Nested
Enclosing class:
KDTreePositions

private static class KDTreePositions.Nested extends KDTreePositions
  • Field Details

    • positions

      private final double[][] positions
  • Constructor Details

    • Nested

      Nested(double[][] positions)
  • Method Details

    • get

      public double get(int i, int d)
      Description copied from class: KDTreePositions
      Get the coordinates of the node i in dimension d.
      Specified by:
      get in class KDTreePositions
      Returns:
      the coordinate
    • asFlatArray

      public double[] asFlatArray()
      Description copied from class: KDTreePositions
      Get positions of points in the tree as a flat double[] array where positions[d + i*n] is dimension d of the i-th point.

      For serialisation and usage by the tree.

      Internal storage may be a NESTED double[][] array. In this case, flatPositions() returns null.

      Specified by:
      asFlatArray in class KDTreePositions
    • asNestedArray

      public double[][] asNestedArray()
      Description copied from class: KDTreePositions
      Get positions of points in the tree as a nested double[][] array where positions[d][i] is dimension d of the i-th point.

      For serialisation and usage by the tree.

      Internal storage may be flattened into single double[] array. In this case, the nested double[][] array is created here.

      Specified by:
      asNestedArray in class KDTreePositions
    • createBoundingBox

      protected RealInterval createBoundingBox()
      Specified by:
      createBoundingBox in class KDTreePositions
    • layout

      Description copied from class: KDTreePositions
      Get the internal layout of positions.

      Positions are stored in either FLAT or NESTED layout. With NESTED layout, positions are stored as a nested double[][] array where positions[d][i] is dimension d of the i-th point. With FLAT layout, positions are stored as a flat double[] array, where positions[d + i*n] is dimension d of the i-th point, with n the number of dimensions.

      Specified by:
      layout in class KDTreePositions