Class PdfType2Function

  • All Implemented Interfaces:
    IPdfFunction

    public class PdfType2Function
    extends AbstractPdfFunction<PdfDictionary>
    This class represents Pdf type 2 function that defines an exponential interpolation of one input value to n output values.

    For more info see ISO 32000-1, section 7.10.3 "Type 2 (Exponential Interpolation) Functions".

    • Field Detail

      • c0

        private double[] c0
      • c1

        private double[] c1
      • n

        private double n
    • Constructor Detail

      • PdfType2Function

        public PdfType2Function​(PdfDictionary dict)
        Instantiates a new PdfType2Function instance based on passed PdfDictionary instance.
        Parameters:
        dict - the function dictionary
      • PdfType2Function

        public PdfType2Function​(double[] domain,
                                double[] range,
                                double[] c0,
                                double[] c1,
                                double n)
      • PdfType2Function

        public PdfType2Function​(float[] domain,
                                float[] range,
                                float[] c0,
                                float[] c1,
                                double n)
    • Method Detail

      • calculate

        public double[] calculate​(double[] input)
        Description copied from interface: IPdfFunction
        Calculates one set of input components to one set of output components.
        Parameters:
        input - The input values size must contain IPdfFunction.getInputSize() items
        Returns:
        an array the size of IPdfFunction.getOutputSize() items containing the result
      • getC0

        public final double[] getC0()
        Gets values of C0 array.
        Returns:
        the values of C0 array
      • setC0

        public final void setC0​(double[] value)
        Sets values of C0 array.
        Parameters:
        value - the values of C0 array
      • getC1

        public final double[] getC1()
        Gets values of C1 array.
        Returns:
        the values of C1 array
      • setC1

        public final void setC1​(double[] value)
        Sets values of C1 array.
        Parameters:
        value - the values of C1 array
      • getN

        public final double getN()
        Gets value of N field.
        Returns:
        the value of N field
      • setN

        public final void setN​(double value)
        sets value of N field.
        Parameters:
        value - the value of N field
      • initializeCArray

        private static double[] initializeCArray​(PdfArray c,
                                                 PdfArray otherC,
                                                 PdfArray range,
                                                 double defaultValue)