Class PointCloud

java.lang.Object
uk.ac.starlink.ttools.plot2.PointCloud

@Equality public class PointCloud extends Object
Represents an unordered set of data positions forming part of a plot. An iterator over the points is provided. Instances of this class may also be compared for equality: if instances compare equal, the iterators will dispense the same positions, though not necessarily in the same order.

The unordered semantics of this class is imposed by the equality requirement. Most of the ordering could be restored by rewording the contract a bit differently if that becomes useful, but at time of writing it's not needed.

Since:
13 Feb 2013
Author:
Mark Taylor
  • Constructor Details

    • PointCloud

      public PointCloud(SubCloud[] subClouds)
      Constructs a point cloud from an array of subclouds. The order of the items in the array may determine the sequence of point iteration, but does not affect equality with respect to other instances.
      Parameters:
      subClouds - array of cloud components
    • PointCloud

      public PointCloud(SubCloud subCloud)
      Constructs a point cloud from a single subcloud.
      Parameters:
      subCloud - cloud component
  • Method Details

    • createDataPosSupplier

      public Supplier<CoordSequence> createDataPosSupplier(DataStore dataStore)
      Returns an iterable over data positions. Iteration is over dataDimCount-element coordinate arrays giving position in data space.
      Parameters:
      dataStore - data storage object
      Returns:
      iterable over usable data positions
    • getSubClouds

      public SubCloud[] getSubClouds()
      Returns an array of the subclouds in this point cloud.
      Returns:
      subcloud array
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object