GLIDER allows to define functions of one variable given by a set of pairs of values (points). The first element of the pair is the value of the argument (it belongs to the domain). The second is the corresponding value of the function. The type of the argument, type of the function and the method of interpolation must be declared. This declaration has the heading GFUNCTIONS followed by declarations with syntax:
<function identifier> <interpolation method> (<argument type>) : <function type> : <maximum number of points>;
<interpolation method>
indicates the method to be used
to compute values for intermediate values of arguments not given
in the set of pairs.
The methods may be:
DISC
: intermediate values are not allowed. The function is
only defined for the values given in the set of pairs.STAIR
: the function value corresponding to an intermediate
value of the argument is the corresponding to the
more near value of the arguments in the set of values lesser
than the given argument, i.e., the function is
supposed piecewise constant and continuous from the right.POLYG
: a linear interpolation is used.SPLINE
: a cubic spline interpolation is used.FREQ
: is not an interpolation method. The value of the
function is taken at random among the possible values of the
first element of each pair. The second element is interpreted
as proportional to the probability of the corresponding first
value.
<argument type>
and <function type>
may
conform with the following table:
argument valueDISC enumerate or real enumerate or real
STAIR real real
POLYG real real
SPLINE real real
FREQ enumerate or real real (>=0)
<maximum number of points>
is a positive integer that indicates
the maximum number of pairs of values that define the function. In 3.3 the assignation of the set of pairs of values to a function is described.
Example:
GFUNCTIONS Temp POLYG (REAL): REAL: 8; pH SPLINE(REAL): REAL: 12; Price STAIR (REAL): REAL: 9; CarTyp FREQ (CarType): REAL: 8; Cost DISC (Size): REAL: 5;