uk.ac.starlink.ttools.plot2.data
Class FloatingArrayCoord

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.data.SingleCoord
      extended by uk.ac.starlink.ttools.plot2.data.FloatingArrayCoord
All Implemented Interfaces:
Coord

public abstract class FloatingArrayCoord
extends SingleCoord

Coord implementation for a variable-length array of floating point values. This covers both single and double precision.

Since:
15 Jul 2013
Author:
Mark Taylor

Method Summary
static FloatingArrayCoord createCoord(InputMeta meta, boolean isRequired)
          Constructs a new FloatingArrayCoord.
static Class[] getAcceptableClasses()
          Returns a list of the classes which can be used as single user coordinate values for floating array coordinates.
abstract  int getArrayCoordLength(TupleSequence tseq, int icol)
          Returns the length of an array value at an appropriate column in the current row of a given TupleSequence.
abstract  double[] readArrayCoord(TupleSequence tseq, int icol)
          Reads an array value from an appropriate column in the current row of a given TupleSequence.
 
Methods inherited from class uk.ac.starlink.ttools.plot2.data.SingleCoord
getInput, getInputs, getStorageType, isRequired
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface uk.ac.starlink.ttools.plot2.data.Coord
inputToStorage
 

Method Detail

readArrayCoord

public abstract double[] readArrayCoord(TupleSequence tseq,
                                        int icol)
Reads an array value from an appropriate column in the current row of a given TupleSequence.

Parameters:
tseq - sequence positioned at a row
icol - index of column in sequence corresponding to this Coord
Returns:
value of floating array colun at the current sequence row

getArrayCoordLength

public abstract int getArrayCoordLength(TupleSequence tseq,
                                        int icol)
Returns the length of an array value at an appropriate column in the current row of a given TupleSequence.

Parameters:
tseq - sequence positioned at a row
icol - index of column in sequence corresponding to this Coord
Returns:
array length

getAcceptableClasses

public static Class[] getAcceptableClasses()
Returns a list of the classes which can be used as single user coordinate values for floating array coordinates. It's all the primitive numeric array types.


createCoord

public static FloatingArrayCoord createCoord(InputMeta meta,
                                             boolean isRequired)
Constructs a new FloatingArrayCoord.

Parameters:
meta - input value metadata
isRequired - true if this coordinate is required for plotting
Returns:
new coord


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.