com.sun.pdfview.function

Class FunctionType2

public class FunctionType2 extends PDFFunction

A type 2 function is an exponential interpolation function, which maps from one input value to n output values using a simple exponential formula.
Constructor Summary
FunctionType2()
Creates a new instance of FunctionType2
Method Summary
protected voiddoFunction(float[] inputs, int inputOffset, float[] outputs, int outputOffset)
Calculate the function value for the input.
floatgetC0(int index)
Get the values at zero
floatgetC1(int index)
Get the values at one
floatgetN()
Get the exponent
protected voidparse(PDFObject obj)
Read the zeros, ones and exponent
protected voidsetC0(float[] c0)
Set the values at zero
protected voidsetC1(float[] c1)
Set the values at one
protected voidsetN(float n)
Set the exponent

Constructor Detail

FunctionType2

public FunctionType2()
Creates a new instance of FunctionType2

Method Detail

doFunction

protected void doFunction(float[] inputs, int inputOffset, float[] outputs, int outputOffset)
Calculate the function value for the input. For each output (j), the function value is: C0(j) + x^N * (C1(j) - C0(j))

getC0

public float getC0(int index)
Get the values at zero

getC1

public float getC1(int index)
Get the values at one

getN

public float getN()
Get the exponent

parse

protected void parse(PDFObject obj)
Read the zeros, ones and exponent

setC0

protected void setC0(float[] c0)
Set the values at zero

setC1

protected void setC1(float[] c1)
Set the values at one

setN

protected void setN(float n)
Set the exponent