Package com.ribs.pdf

Class PDFFunction

    • Field Detail

      • ExponentialInterpolation

        public static final int ExponentialInterpolation
        See Also:
        Constant Field Values
      • functionType

        public int functionType
      • inputDomain

        public float[] inputDomain
      • outputRange

        public float[] outputRange
      • returnValues

        public float[] returnValues
      • inputValues

        public float[] inputValues
    • Constructor Detail

      • PDFFunction

        public PDFFunction()
      • PDFFunction

        public PDFFunction​(java.util.Map functionDict,
                           PDFFile srcFile)
        Constructor - takes the pdf function dictionary and the file it came from.
      • PDFFunction

        public PDFFunction​(PDFStream functionStream,
                           PDFFile srcFile)
        Constructor for functions which take a stream
    • Method Detail

      • getInstance

        public static PDFFunction getInstance​(java.lang.Object function,
                                              PDFFile srcFile)
        Reads the function dictionary and creates an instance of the appropriate PDFFunction subclass
      • initializeParameters

        public void initializeParameters​(java.util.Map functionDict,
                                         PDFFile srcFile)
        Read the function parameters
      • numInputValues

        public int numInputValues()
        Returns the number of parameters this function takes as input
      • numOutputValues

        public int numOutputValues()
        Returns the number of values this function returns. Should be overridden by subclasses that don't require outputRange.
      • evaluate

        public float[] evaluate​(float[] inputs)
        Evaluate the function. Note that the return value array is reused, so if you need to save the results around for any length of time, you should copy them out.
      • clipToRange

        public void clipToRange​(float[] vals,
                                float[] range,
                                float[] clipped)
        Used internally by all function types to clip both the input and the output values to the Range and Domain values.
      • function_implementation

        public abstract void function_implementation​(float[] in,
                                                     float[] out)