Class SliceDataGeom

  • All Implemented Interfaces:
    DataGeom

    public class SliceDataGeom
    extends java.lang.Object
    implements DataGeom
    DataGeom implementation that reads positions corresponding to some, but not all, orthogonal data position coordinates.
    Since:
    16 Jul 2013
    Author:
    Mark Taylor
    • Constructor Summary

      Constructors 
      Constructor Description
      SliceDataGeom​(FloatingCoord[] sliceCoords, java.lang.String variantName)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getDataDimCount()
      Returns the dimensionality of the plot surface's plot space.
      Coord[] getPosCoords()
      Returns an array of the non-null coords.
      java.lang.String getVariantName()
      Returns a label for this DataGeom.
      int hashCode()  
      boolean readDataPos​(Tuple tuple, int ic, double[] dpos)
      Determines the positional coordinates in data space for a supplied tuple.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SliceDataGeom

        public SliceDataGeom​(FloatingCoord[] sliceCoords,
                             java.lang.String variantName)
        Constructor. The supplied array of coordinates should contain an element for each of the data position coordinates, but some of those elements may be null, to indicate that no positioning is done in that dimension. Coordinates read into a data position array in the corresponding dimensions will be given as NaNs.
        Parameters:
        sliceCoords - per-data dimension array of coords, some elements may be null
        variantName - variant name
    • Method Detail

      • getDataDimCount

        public int getDataDimCount()
        Description copied from interface: DataGeom
        Returns the dimensionality of the plot surface's plot space.
        Specified by:
        getDataDimCount in interface DataGeom
        Returns:
        number of elements in data space coordinate array
      • getVariantName

        public java.lang.String getVariantName()
        Description copied from interface: DataGeom
        Returns a label for this DataGeom. It may be used to distinguish from other geoms used in the same plot type, so for instance call it "Cartesian" or "Polar" rather than "Plane" if it's X,Y.
        Specified by:
        getVariantName in interface DataGeom
        Returns:
        user-directed input coordinate type name
      • getPosCoords

        public Coord[] getPosCoords()
        Returns an array of the non-null coords.
        Specified by:
        getPosCoords in interface DataGeom
        Returns:
        coordinate quantity array for this geometry
      • readDataPos

        public boolean readDataPos​(Tuple tuple,
                                   int ic,
                                   double[] dpos)
        Description copied from interface: DataGeom
        Determines the positional coordinates in data space for a supplied tuple.

        A parameter supplies the index of the field in the tuple at which the positional coordinate(s) can be found. Each position is represented by DataGeom.getPosCoords() columns of the tuple. By convention positions are at the start of the tuple, so if there is one position in the tuple it will be at icol=0, and there are multiple positions the N'th one will be at icol=N*getPosCoords().

        An array of (at least) DataGeom.getDataDimCount() elements is supplied, and on success the data space coordinate values are written into it.

        Specified by:
        readDataPos in interface DataGeom
        Parameters:
        tuple - coordinate tuple
        ic - column index in tuple at which the positional information starts
        dpos - array into which data space coordinates are written
        Returns:
        true iff conversion was successful
      • 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