Class PDFFunction
- java.lang.Object
- 
- com.inductiveautomation.rm.pdf.reader.PDFFunction
 
- 
- Direct Known Subclasses:
- ArrayFunction,- InterpolationFunction,- SampledFunction,- StitchingFunction
 
 public abstract class PDFFunction extends java.lang.ObjectThis is an abstract superclass for all objects implementing PDF functions. PDF functions come in several flavors, but their basic job is to take a set of n input values and return m output values.
- 
- 
Field SummaryFields Modifier and Type Field Description static intExponentialInterpolationintfunctionTypefloat[]inputDomainfloat[]inputValuesfloat[]outputRangestatic intPostScriptCalculatorfloat[]returnValuesstatic intSampledstatic intStitching
 - 
Constructor SummaryConstructors Constructor Description PDFFunction()PDFFunction(PDFStream functionStream, PDFFile srcFile)Constructor for functions which take a streamPDFFunction(java.util.Map functionDict, PDFFile srcFile)Constructor - takes the pdf function dictionary and the file it came from.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclipToRange(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.float[]evaluate(float[] inputs)Evaluate the function.abstract voidfunction_implementation(float[] in, float[] out)static PDFFunctiongetInstance(java.lang.Object function, PDFFile srcFile)Reads the function dictionary and creates an instance of the appropriate PDFFunction subclassvoidinitializeParameters(java.util.Map functionDict, PDFFile srcFile)Read the function parametersintnumInputValues()Returns the number of parameters this function takes as inputintnumOutputValues()Returns the number of values this function returns.
 
- 
- 
- 
Field Detail- 
Sampledpublic static final int Sampled - See Also:
- Constant Field Values
 
 - 
ExponentialInterpolationpublic static final int ExponentialInterpolation - See Also:
- Constant Field Values
 
 - 
Stitchingpublic static final int Stitching - See Also:
- Constant Field Values
 
 - 
PostScriptCalculatorpublic static final int PostScriptCalculator - See Also:
- Constant Field Values
 
 - 
functionTypepublic int functionType 
 - 
inputDomainpublic float[] inputDomain 
 - 
outputRangepublic float[] outputRange 
 - 
returnValuespublic float[] returnValues 
 - 
inputValuespublic float[] inputValues 
 
- 
 - 
Constructor Detail- 
PDFFunctionpublic PDFFunction() 
 - 
PDFFunctionpublic PDFFunction(java.util.Map functionDict, PDFFile srcFile)Constructor - takes the pdf function dictionary and the file it came from.
 
- 
 - 
Method Detail- 
getInstancepublic static PDFFunction getInstance(java.lang.Object function, PDFFile srcFile) Reads the function dictionary and creates an instance of the appropriate PDFFunction subclass
 - 
initializeParameterspublic void initializeParameters(java.util.Map functionDict, PDFFile srcFile)Read the function parameters
 - 
numInputValuespublic int numInputValues() Returns the number of parameters this function takes as input
 - 
numOutputValuespublic int numOutputValues() Returns the number of values this function returns. Should be overridden by subclasses that don't require outputRange.
 - 
evaluatepublic 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.
 - 
clipToRangepublic 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_implementationpublic abstract void function_implementation(float[] in, float[] out)
 
- 
 
-