A function object: a live view over a function dictionary or stream that evaluates the function it describes.
public abstract class PdfFunction
ISO 32000-2 §7.10. Get one with GetFunction(CosObject); the subclass says which of the four types it is (PdfSampledFunction, PdfExponentialFunction, PdfStitchingFunction, PdfPostScriptFunction). Entries such as Domain are read from the COS object on every call.
Evaluation runs on a form compiled once from the COS objects: inputs are clipped to the domain, outputs to the range (§7.10.1).
When any object it was compiled from changes through the public API, the next evaluation compiles it again. Evaluation is safe
from any number of threads while nobody mutates the document, allocates nothing, never returns NaN or infinity, and never throws
for anything in the file: a function that cannot be used (IsValid is false) yields 0 clipped to
its range. Deviations are recorded as the document's diagnostics: those found compiling, once; an error met while evaluating (a
Type 4 division by zero, for instance), once per compiled function. In strict mode both throw DiagnosticException.
kind:method, kind:property, kind:ctor. Press Esc to clear.CosObjectGets the function object: a CosDictionary (Types 2 and 3) or a CosStream (Types 0 and 4).DictionaryGets the function dictionary: the dictionary itself, or the stream's dictionary.DomainGets the Domain entry: 2 × m numbers, an interval per input; empty when it is missing or not numbers.FunctionTypeGets the function's type, its FunctionType entry.InputCountGets m, the number of input values, as compiled.IsValidGets a value indicating whether the function could be compiled. An invalid function evaluates to 0 clipped to its range.MinimumVersionGets the earliest PDF version that has this type of function: 1.2 for Type 0, 1.3 for the others.OutputCountGets n, the number of output values, as compiled.RangeGets the Range entry: 2 × n numbers, an interval per output; null when absent.ReferenceGets the indirect reference the function was reached through, or null for a direct object.Evaluate(ReadOnlySpan<Single>, Span<Single>, Int32)Evaluates the function at count points stored one after the other.Evaluate(ReadOnlySpan<Single>, Span<Single>)Evaluates the function at one point.