|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.data.SingleCoord
uk.ac.starlink.ttools.plot2.data.FloatingCoord
public class FloatingCoord
Coord implementation for floating point values. This covers both single and double precision. Currently there is a factory method to generate an instance of this class, which uses single or double precision according to a global configuration parameter. Although in general double precision processing is important, for plotting purposes it's not usually going to make a visible difference, and the cached storage requirements are cut in half if you use single precision instead. Maybe see about different configuration options for this in the future.
Field Summary | |
---|---|
static FloatingCoord |
WEIGHT_COORD
Coordinate instance used for weighting values. |
Method Summary | |
---|---|
static FloatingCoord |
createCoord(InputMeta meta,
boolean isRequired)
Factory method to return an instance of this class. |
static FloatingCoord |
createTimeCoord(InputMeta meta,
boolean isRequired)
Returns a new time coordinate. |
Object |
inputToStorage(Object[] userValues,
uk.ac.starlink.table.DomainMapper[] mappers)
Turns a quantity in the user view to a plotting view object. |
double |
readDoubleCoord(Tuple tuple,
int icol)
Reads a floating point value from an appropriate field in a given Tuple. |
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 |
Field Detail |
---|
public static FloatingCoord WEIGHT_COORD
Method Detail |
---|
public Object inputToStorage(Object[] userValues, uk.ac.starlink.table.DomainMapper[] mappers)
Coord
The supplied parameters both correspond (have the same length as)
this object's Inputs array.
For each Input, the corresponding element of the
inputValues
array gives the value obtained from
the user-supplied data (matching Input.getValueClass()
),
and the corresponding element of the inputMappers
array gives a DomainMapper object
(consistent with Input.getDomain()
).
InputMappers may be null however, and in many cases,
coordinates are not sensitive to domains,
and for those cases implementations will ignore
inputMappers
.
userValues
- per-input valuesmappers
- per-input domain mappers, each may be null
Coord.getStorageType()
; not nullpublic double readDoubleCoord(Tuple tuple, int icol)
tuple
- tupleicol
- index of column in tuple corresponding to this Coord
public static FloatingCoord createCoord(InputMeta meta, boolean isRequired)
PlotUtil.storeFullPrecision()
method.
meta
- input value metadataisRequired
- true if this coordinate is required for plotting
public static FloatingCoord createTimeCoord(InputMeta meta, boolean isRequired)
meta
- input value metadataisRequired
- true if this coordinate is required for plotting
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |