Package uk.ac.starlink.ttools.plot2
Class SubCloud
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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
equals(java.lang.Object o)
DataGeom
getDataGeom()
Returns the data geom for this subcloud.DataSpec
getDataSpec()
Returns the data spec for this subcloud.int
getPosCoordIndex()
Returns the index of the data spec coordinate at which the position information starts for this subcloud.int
hashCode()
-
-
-
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.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 layersdeduplicate
- 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 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
-
-