class PDFunctionType2 extends PDFunction
{

    /**
     * The C0 values of the exponential function.
     */
    private final COSArray c0;
    /**
     * The C1 values of the exponential function.
     */
    private final COSArray c1;
    /**
     * The exponent value of the exponential function.
     */
    private final float exponent;

    /**
     * Constructor.
     *
     * @param function The function.
     */
    public PDFunctionType2(COSBase function)
    {
        super(function);

        c0 = Objects.requireNonNullElseGet(getCOSObject().getCOSArray(COSName.C0), COSArray::new);
        if (c0.isEmpty())
        {
            c0.add(COSFloat.ZERO);
        }

        c1 = Objects.requireNonNullElseGet(getCOSObject().getCOSArray(COSName.C1), COSArray::new);
        if (c1.isEmpty())
        {
            c1.add(COSFloat.ONE);
        }

        exponent = getCOSObject().getFloat(COSName.N);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int getFunctionType()
    {
        return 2;
    }

    /**
     * Performs exponential interpolation
     *
     * {@inheritDoc}
     */
    @Override
    public float[] eval(float[] input) throws IOException
    {
        // exponential interpolation
        float xToN = (float) Math.pow(input[0], exponent); // x^exponent

        float[] result = new float[Math.min(c0.size(), c1.size())];
        for (int j = 0; j < result.length; j++)
        {
            float c0j = ((COSNumber) c0.get(j)).floatValue();
            float c1j = ((COSNumber) c1.get(j)).floatValue();
            result[j] = c0j + xToN * (c1j - c0j);
        }

        return clipToRange(result);
    }

    /**
     * Returns the C0 values of the function, 0 if empty.
     *
     * @return a COSArray with the C0 values
     */
    public COSArray getC0()
    {
        return c0;
    }

    /**
     * Returns the C1 values of the function, 1 if empty.
     *
     * @return a COSArray with the C1 values
     */
    public COSArray getC1()
    {
        return c1;
    }

    /**
     * Returns the exponent of the function.
     *
     * @return the float value of the exponent
     */
    public float getN()
    {
        return exponent;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString()
    {<FILL_FUNCTION_BODY>}
}

        return "FunctionType2{"
                + "C0: " + getC0() + " "
                + "C1: " + getC1() + " "
                + "N: " + getN() + "}";
    
<methods>public void <init>(org.apache.pdfbox.cos.COSBase) ,public static org.apache.pdfbox.pdmodel.common.function.PDFunction create(org.apache.pdfbox.cos.COSBase) throws java.io.IOException,public abstract float[] eval(float[]) throws java.io.IOException,public final org.apache.pdfbox.cos.COSDictionary getCOSObject() ,public org.apache.pdfbox.pdmodel.common.PDRange getDomainForInput(int) ,public abstract int getFunctionType() ,public int getNumberOfInputParameters() ,public int getNumberOfOutputParameters() ,public org.apache.pdfbox.pdmodel.common.PDRange getRangeForOutput(int) ,public void setDomainValues(org.apache.pdfbox.cos.COSArray) ,public void setRangeValues(org.apache.pdfbox.cos.COSArray) ,public java.lang.String toString() <variables>private org.apache.pdfbox.cos.COSArray domain,private org.apache.pdfbox.cos.COSDictionary functionDictionary,private org.apache.pdfbox.pdmodel.common.PDStream functionStream,private int numberOfInputValues,private int numberOfOutputValues,private org.apache.pdfbox.cos.COSArray range