Documentation of 'visad.CachingCoordinateSystem' Java class
CachingCoordinateSystem
visad

Class CachingCoordinateSystem

  • All Implemented Interfaces:
    java.io.Serializable


    public class CachingCoordinateSystem
    extends CoordinateSystem
    A wrapper class for CoordinateSystems that will cache the last values input and output values of the toReference and fromReference methods. If the inputs are the same as the last time these methods were called, the previously calculated values are returned.
    See Also:
    Serialized Form
    • Field Detail

      • debugTime

        public static boolean debugTime
        Show time to transform
    • Constructor Detail

      • CachingCoordinateSystem

        public CachingCoordinateSystem(CoordinateSystem cs)
                                throws VisADException
        Construct a new CachingCoordinateSystem that wraps around the input.
        Parameters:
        cs - CoordinateSystem to wrap
        Throws:
        VisADException
    • Method Detail

      • toReference

        public double[][] toReference(double[][] inputs)
                               throws VisADException
        Wrapper around the toReference method of the input CoordinateSystem. If the inputs are the same as the last time this method was called, the previously computed outputs will be returned, otherwise the toReference method of the wrapped CS is called and it's output is returned
        Specified by:
        toReference in class CoordinateSystem
        Parameters:
        inputs - values to transform
        Returns:
        transformed input values.
        Throws:
        VisADException - when wrapped CS does
      • fromReference

        public double[][] fromReference(double[][] inputs)
                                 throws VisADException
        Wrapper around the fromReference method of the input CoordinateSystem. If the inputs are the same as the last time this method was called, the previously computed outputs will be returned, otherwise the fromReference method of the wrapped CS is called and it's output is returned
        Specified by:
        fromReference in class CoordinateSystem
        Parameters:
        inputs - values to transform
        Returns:
        transformed input values.
        Throws:
        VisADException - when wrapped CS does
      • toReference

        public float[][] toReference(float[][] inputs)
                              throws VisADException
        Wrapper around the toReference method of the input CoordinateSystem. If the inputs are the same as the last time this method was called, the previously computed outputs will be returned, otherwise the toReference method of the wrapped CS is called and it's output is returned
        Overrides:
        toReference in class CoordinateSystem
        Parameters:
        inputs - values to transform
        Returns:
        transformed input values.
        Throws:
        VisADException - when wrapped CS does
      • fromReference

        public float[][] fromReference(float[][] inputs)
                                throws VisADException
        Wrapper around the fromReference method of the input CoordinateSystem. If the inputs are the same as the last time this method was called, the previously computed outputs will be returned, otherwise the fromReference method of the wrapped CS is called and it's output is returned
        Overrides:
        fromReference in class CoordinateSystem
        Parameters:
        inputs - values to transform
        Returns:
        transformed input values.
        Throws:
        VisADException - when wrapped CS does
      • equals

        public boolean equals(java.lang.Object obj)
        Check for equality of CoordinateSystem objects
        Specified by:
        equals in class CoordinateSystem
        Parameters:
        obj - other object in question
        Returns:
        true if the object in question is a CachingCoordinateSystem and it's CS is equal this object's CS
      • getCachedCoordinateSystem

        public CoordinateSystem getCachedCoordinateSystem()
        Access to the "cached" CS
        Returns:
        cached CoordinateSystem
      • toString

        public java.lang.String toString()
        A decriptive string of this CS.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a descriptive String

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.