Package uk.ac.starlink.ttools.plot2
Class SubCloud
java.lang.Object
uk.ac.starlink.ttools.plot2.SubCloud
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.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.static SubCloud[]
createSubClouds
(PlotLayer[] layers, boolean deduplicate) Returns an array of subclouds from a list of layers, with optional deduplication.boolean
Returns the data geom for this subcloud.Returns the data spec for this subcloud.int
Returns the index of the data spec coordinate at which the position information starts for this subcloud.int
hashCode()
-
Constructor Details
-
SubCloud
Constructor.- Parameters:
geom
- data geomspec
- data speciPosCoord
- index of coordinate at which position information starts in the DataSpec
-
-
Method Details
-
getDataGeom
Returns the data geom for this subcloud.- Returns:
- geom
-
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() -
equals
-
createSubClouds
Returns an array of subclouds from a list of layers, with optional deduplication.- Parameters:
layers
- plot layersdeduplicate
- true to cull duplicate subclouds- Returns:
- subclouds
-
createPartialSubClouds
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 layersdeduplicate
- 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 geomspec
- data specnpos
- number of positions in the data specdeduplicate
- true to cull duplicate layers- Returns:
- collection of subclouds
-