kcl.waterloo.graphics.transforms
Class Log10Transform
- java.lang.Object
-
- kcl.waterloo.graphics.transforms.GJAbstractDataTransform
-
- kcl.waterloo.graphics.transforms.Log10Transform
-
- All Implemented Interfaces:
- GJDataTransformInterface
public final class Log10Transform extends GJAbstractDataTransform
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.ArrayList<java.lang.Double>getAxisTickPositions(double start, double stop, double inc)doublegetData(double val)Transforms and returns a single value.double[]getData(double[] arr)Transforms and returns an array of values.static Log10TransformgetInstance()doublegetInverse(double val)Returns the inverse transform of the specified value.java.util.ArrayList<java.lang.Double>getMinorGridPositions(double start, double stop, double inc, int n)java.lang.StringgetName()The name for this transform as a Stringjava.lang.StringgetTickLabel(double val)Returns a String based on the input value which can be used to label the axes.-
Methods inherited from class kcl.waterloo.graphics.transforms.GJAbstractDataTransform
getInverse, getNumberFormatter
-
-
-
-
Method Detail
-
getInstance
public static Log10Transform getInstance()
-
getName
public java.lang.String getName()
Description copied from interface:GJDataTransformInterfaceThe name for this transform as a String- Returns:
- a name
-
getData
public final double getData(double val)
Description copied from interface:GJDataTransformInterfaceTransforms and returns a single value.- Parameters:
val- the value to transform- Returns:
- the transformed value
-
getData
public final double[] getData(double[] arr)
Description copied from interface:GJDataTransformInterfaceTransforms and returns an array of values. Note that, as any concrete implementation can transform the src array by reference, it is recommended that src be a defensive copy of the required input. An output is required for pass-by-value systems like MATLAB- Parameters:
arr- array to transform- Returns:
- a tranformed array that may be a reference to src or a copy.
-
getInverse
public final double getInverse(double val)
Description copied from interface:GJDataTransformInterfaceReturns the inverse transform of the specified value. Returns Double.NaN if the method is not implemented.- Returns:
- a double value
-
getTickLabel
public final java.lang.String getTickLabel(double val)
Description copied from interface:GJDataTransformInterfaceReturns a String based on the input value which can be used to label the axes. The output string can be empty if no label is required- Returns:
- an Object
-
getAxisTickPositions
public java.util.ArrayList<java.lang.Double> getAxisTickPositions(double start, double stop, double inc)- Parameters:
start- typically the left-hand/bottom of the axis rangestop- typically the right-hand/top of the axis rangeinc- distance between major grids- Returns:
- values for the major grid positions (already transformed)
-
getMinorGridPositions
public java.util.ArrayList<java.lang.Double> getMinorGridPositions(double start, double stop, double inc, int n)n- number of minor grid positions- Returns:
- values for the minor grid positions (n-2 entries as the 0th and nth coincide with the major grid). These values should be added to the axis tick positions to get the minor grid positions (already transformed)
-
-
DMelt 3.0 © DataMelt by jWork.ORG