PostScriptCalculatorFunction Class Documentation
class PostScriptCalculatorFunction : FunctionNamespace:com::datalogics::PDFL
- Inherits from:
Function
Detailed Description
A function represented as a stream containing code written in a small subset of the PostScript language.
Constructor & Destructor Documentation
PostScriptCalculatorFunction
PostScriptCalculatorFunction(java.util.List< Double > domain, java.util.List< Double > range, String code)Parameters
domain: java.util.List< Double >an array of 2 * m numbers, where m is the number of input values
range: java.util.List< Double >an array of 2 * n numbers, where n is the number of output values
code: Stringthe code of the function, written in a subset of the PostScript language
Create PostScript calculator function, represented as a stream containing code written in a small subset of the PostScript language.
Field Documentation
DEFAULT
static DEFAULTThe Default named function.
IDENTITY
static IDENTITYThe Identity named function, which returns its input values unchanged.
Member Function Documentation
apply
java.util.List< Double > apply(java.util.List< Double > args)Parameters
args: java.util.List< Double >input values for the function. The number of input values must agree with the number of inputs the function takes.
Returns:
java.util.List< Double >a list of the result values from the function
Apply the function to supplied input values
delete
synchronized void delete(Boolean disposing)Parameters
disposing: Boolean
Returns:
synchronized voiddelete
synchronized void delete()Returns:
synchronized voidfinalize
void finalize()Returns:
voidgetCode
String getCode()Returns:
StringThe code of the function, written in a subset of the PostScript language. The code defines how input values are transformed into output values.
getDomain
java.util.List< Double > getDomain()Returns:
java.util.List< Double >The domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values.
getNInputs
int getNInputs()Returns:
intThe number of inputs to the function.
getNOutputs
int getNOutputs()Returns:
intThe number of outputs from the function.
getRange
java.util.List< Double > getRange()Returns:
java.util.List< Double >The range of the function. Contains 2 * n elements, where n is the number of outputs from the function. Each successive pair of elements gives the minimum and maximum values for one of the outputs. Output values from the function are clamped to these minimum and maximum values.
getStream
PDFStream getStream()Returns:
PDFStreamThe underlying PDF stream for this PostScriptCalculatorFunction. The stream contains the PostScript code that defines the function.
setDomain
void setDomain(java.util.List< Double > domain)Parameters
domain: java.util.List< Double >
Returns:
voidThe domain of the function. Contains 2 * m elements, where m is the number of inputs to the function. Each successive pair of elements gives the minimum and maximum values for one of the inputs. Input values to the function are clamped to these minimum and maximum values.
setRange
void setRange(java.util.List< Double > range)Parameters
range: java.util.List< Double >
Returns:
voidThe range of the function. Contains 2 * n elements, where n is the number of outputs from the function. Each successive pair of elements gives the minimum and maximum values for one of the outputs. Output values from the function are clamped to these minimum and maximum values.
toString
String toString()Returns:
StringA string representation of the PostScriptCalculatorFunction, including the number of inputs and outputs, domain, range, and the PostScript code.
A string value describing the function.