Documentation of 'kcl.waterloo.graphics.transforms.NOPTransform' Java class
NOPTransform
kcl.waterloo.graphics.transforms

Class NOPTransform

  • All Implemented Interfaces:
    GJDataTransformInterface


    public final class NOPTransform
    extends GJAbstractDataTransform
    Concrete implementation of GJAbstractGraphAbstractTransform providing linear axis support for graphs implementing GJGraphInterface NOPTransform is a single instance class. Retrieve a reference to the instance by calling the static getInstance method
    • 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)
      double getData(double val)
      Transforms and returns a single value.
      double[] getData(double[] arr)
      Transforms and returns an array of values.
      static NOPTransform getInstance()
      Retrieves a reference to the instance
      double getInverse(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.String getName()
      The name for this transform as a String
      java.lang.Object getTickLabel(double val)
      Returns a String based on the input value which can be used to label the axes.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static NOPTransform getInstance()
        Retrieves a reference to the instance
        Returns:
        the instance
      • getData

        public double getData(double val)
        Transforms and returns a single value.
        Parameters:
        val - the value to transform
        Returns:
        the transformed value
      • getData

        public final double[] getData(double[] arr)
        Transforms 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 double getInverse(double val)
        Returns the inverse transform of the specified value. Returns Double.NaN if the method is not implemented.
        Returns:
        a double value
      • getName

        public java.lang.String getName()
        The name for this transform as a String
        Returns:
        a name
      • getTickLabel

        public java.lang.Object getTickLabel(double val)
        Returns 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 range
        stop - typically the right-hand/top of the axis range
        inc - 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

You see the box below because you did not login.