SECTION 3.9
169
Functions
In addition, each type of function dictionary must include entries appropriate to
the particular function type. The number of output values can usually be inferred
from other attributes of the function; if not (as is always the case for type 0 and
type 4 functions), the
Range
entry is required. The dimensionality of the function
implied by the
Domain
and
Range
entries must be consistent with that implied by
other attributes of the function.
3.9.1 Type 0 (Sampled) Functions
Type 0 functions use a sequence of
sample values
(contained in a stream) to
provide an approximation for functions whose domains and ranges are bounded.
The samples are organized as an
m-dimensional
table in which each entry has
n
components.
Sampled functions are highly general and offer reasonably accurate
representations of arbitrary analytic functions at low expense. For example, a
1-input sinusoidal function can be represented over the range
[ 0 180 ]
with an
average error of only 1 percent, using just ten samples and linear interpolation.
Two-input functions require significantly more samples but usually not a
prohibitive number if the function does not have high frequency variations.
The dimensionality of a sampled function is restricted only by implementation
limits. However, the number of samples required to represent functions with high
dimensionality multiplies rapidly unless the sampling resolution is very low. Also,
the process of multilinear interpolation becomes computationally intensive if the
number of inputs
m
is greater than 2. The multidimensional spline interpolation
is even more computationally intensive.
In addition to the entries in Table 3.35, a type 0 function dictionary includes
those shown in Table 3.36.
The
Domain
,
Encode
, and
Size
entries determine how the function’s input
variable values are mapped into the sample table. For example, if
Size
is
[ 21 31 ]
,
the default
Encode
array is
[ 0 20 0 30 ]
, which maps the entire domain into the
full set of sample table entries. Other values of
Encode
may be used.