Class SubCloud


  • @Equality
    public class SubCloud
    extends java.lang.Object
    Aggregates the DataGeom and the geometry-specific parts of the DataSpec for a layer. This defines one set of positions that it will return for a given tuple sequence (one position per tuple).

    Equality is implemented so that two equal subclouds have the same geom and coordinate columns. This means they will iterate over the same data positions for a given tuple sequence, but not necessarily that they have the same DataSpec objects or coordinate index positions.

    Since:
    29 Nov 2013
    Author:
    Mark Taylor
    • Constructor Detail

      • SubCloud

        public SubCloud​(DataGeom geom,
                        DataSpec spec,
                        int iPosCoord)
        Constructor.
        Parameters:
        geom - data geom
        spec - data spec
        iPosCoord - index of coordinate at which position information starts in the DataSpec
    • Method Detail

      • getDataGeom

        public DataGeom getDataGeom()
        Returns the data geom for this subcloud.
        Returns:
        geom
      • getDataSpec

        public DataSpec getDataSpec()
        Returns the data spec for this subcloud.
        Returns:
        spec
      • getPosCoordIndex

        public int getPosCoordIndex()
        Returns the index of the data spec coordinate at which the position information starts for this subcloud.
        Returns:
        position coordinate index
      • hashCode

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • createSubClouds

        public static SubCloud[] createSubClouds​(PlotLayer[] layers,
                                                 boolean deduplicate)
        Returns an array of subclouds from a list of layers, with optional deduplication.
        Parameters:
        layers - plot layers
        deduplicate - true to cull duplicate subclouds
        Returns:
        subclouds
      • createPartialSubClouds

        public static SubCloud[] createPartialSubClouds​(PlotLayer[] layers,
                                                        boolean deduplicate)
        Returns a collection of subclouds from a list of layers, but including only those layers whose positions are partial. This means that the data position coordinate arrays will have some elements NaN, indicating something other than an actual point in the data space - for instance a vertical or horizontal line.
        Parameters:
        layers - plot layers
        deduplicate - true to cull duplicate subclouds
        Returns:
        subclouds from partial position layers only
      • createSubClouds

        public static SubCloud[] createSubClouds​(DataGeom geom,
                                                 DataSpec spec,
                                                 int npos,
                                                 boolean deduplicate)
        Returns a collection of subclouds for a number of positions from a data spec.
        Parameters:
        geom - data geom
        spec - data spec
        npos - number of positions in the data spec
        deduplicate - true to cull duplicate layers
        Returns:
        collection of subclouds