PDF Clown
0.1.2

org.pdfclown.documents.functions
Class Function<TDataObject extends PdfDataObject>

java.lang.Object
  extended by org.pdfclown.objects.PdfObjectWrapper<TDataObject>
      extended by org.pdfclown.documents.functions.Function<TDataObject>
All Implemented Interfaces:
Cloneable, IPdfObjectWrapper
Direct Known Subclasses:
Type0Function, Type2Function, Type3Function, Type4Function

@PDF(value=PDF12)
public abstract class Function<TDataObject extends PdfDataObject>
extends PdfObjectWrapper<TDataObject>

Function [PDF:1.6:3.9].

Since:
0.1.0
Version:
0.1.2, 12/28/12
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Nested Class Summary
protected static interface Function.IDefaultIntervalsCallback<T extends Comparable<T>>
          Default intervals callback.
 
Constructor Summary
protected Function(Document context, TDataObject baseDataObject)
           
protected Function(PdfDirectObject baseObject)
           
 
Method Summary
abstract  double[] calculate(double[] inputs)
          Gets the result of the calculation applied by this function to the specified input values.
 List<PdfDirectObject> calculate(List<PdfDirectObject> inputs)
          Gets the result of the calculation applied by this function to the specified input values.
protected  PdfDictionary getDictionary()
          Gets this function's dictionary.
 List<Interval<Double>> getDomains()
          Gets the (inclusive) domains of the input values.
 int getInputCount()
          Gets the number of input values (parameters) of this function.
protected
<T extends Comparable<T>>
List<Interval<T>>
getIntervals(PdfName key, Function.IDefaultIntervalsCallback<T> defaultIntervalsCallback)
          Gets the intervals corresponding to the specified key.
 int getOutputCount()
          Gets the number of output values (results) of this function.
 List<Interval<Double>> getRanges()
          Gets the (inclusive) ranges of the output values.
static Function<?> wrap(PdfDirectObject baseObject)
          Wraps a function base object into a function object.
 
Methods inherited from class org.pdfclown.objects.PdfObjectWrapper
checkCompatibility, clone, delete, equals, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Function

protected Function(Document context,
                   TDataObject baseDataObject)

Function

protected Function(PdfDirectObject baseObject)
Method Detail

wrap

public static final Function<?> wrap(PdfDirectObject baseObject)
Wraps a function base object into a function object.

Parameters:
baseObject - Function base object.
Returns:
Function object associated to the base object.

calculate

public abstract double[] calculate(double[] inputs)
Gets the result of the calculation applied by this function to the specified input values.

Parameters:
inputs - Input values.

calculate

public final List<PdfDirectObject> calculate(List<PdfDirectObject> inputs)
Gets the result of the calculation applied by this function to the specified input values.

Parameters:
inputs - Input values.

getDomains

public List<Interval<Double>> getDomains()
Gets the (inclusive) domains of the input values.

Input values outside the declared domains are clipped to the nearest boundary value.


getInputCount

public int getInputCount()
Gets the number of input values (parameters) of this function.


getOutputCount

public int getOutputCount()
Gets the number of output values (results) of this function.


getRanges

public List<Interval<Double>> getRanges()
Gets the (inclusive) ranges of the output values.

Output values outside the declared ranges are clipped to the nearest boundary value; if this entry is absent, no clipping is done.

Returns:
null in case of unbounded ranges.

getDictionary

protected final PdfDictionary getDictionary()
Gets this function's dictionary.


getIntervals

protected final <T extends Comparable<T>> List<Interval<T>> getIntervals(PdfName key,
                                                                         Function.IDefaultIntervalsCallback<T> defaultIntervalsCallback)
Gets the intervals corresponding to the specified key.


PDF Clown
0.1.2

Project home page

Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.