2D functions
Class Realfunction2d
Generic real 2D function class (real function of two real arguments).
Polymorphic input and output is provided for pointers to objects of this
class.
Polymorphic data format:
function_type
data_for_that_function
The data format depends on the type of function chosen.
Names (for identifying the function type) and formats are defined below.
Class: Realfunction2d_1dproduct
Product of two 1D functions of each of the arguments.
Name: 1dproduct
Data format:
function_of_x
function_of_y
Data is a pair of Realfunction1d
s.
Class: Realfunction2d_1dinterp_1
Set of functions of the second argument, using the first argument to
interpolate between the functions.
Name: 1dinterp_1
Data format:
number_of_functions_of_y
For each:
x f(y)
Each f(y)
is a Realfunction1d
.
Class: Realfunction2d_1dinterp_2
Set of functions of the first argument, using the second argument to
interpolate between the functions.
Name: 1dinterp_2
Data format:
number_of_functions_of_x
For each:
y f(x)
Each f(x)
is a Realfunction1d
.
Class: Realfunction2d_table
2D table.
Name: table
.
Data is an array of pairs of doubles modelling f(x) as piecewise linear.
The function evaluated is the linear interpolation (or extrapolation).
Data format:
nx ny (dimensions of table)
For each x:
xi (x-ordinates)
For each y:
yj (y-ordinates)
For each x:
For each y:
fi,j (function values)
Class: Realfunction2d_table_bipoly
2D table with polynomial interpolation.
Name: table_bipoly
.
Data is an array of pairs of doubles modelling f(x) as piecewise polynomial.
The function evaluated is the polynomial interpolation (or extrapolation).
Data format:
As `Table1d', plus
xorder yorder (order of polynomials used to interpolate in x and y)
xfirst (1/0 for interpolation in x first/second)
Class: Realfunction2d_sum
Sum of a set of 2D functions.
Name: sum
.
Data:
number_of_functions
For each:
fi (Realfunction2d)
The function calculated is the sum of the fi
.
Class: Realfunction2d_product
Product of a set of 2D functions.
Name: product
.
Data:
number_of_functions
For each:
fi (Realfunction2d)
The function calculated is the product of the fi
.
Class: Realfunction2d_offset
General 2D function offset by a constant amount.
Name: offset
.
Data:
x0 y0 (offset in x and y direction)
f (Realfunction2d)
The function calculated is f(x-x0,y-y0)
.
Class: Realfunction2d_map
General 2D function with general mappings applied to arguments and result.
Name: map
.
Data:
xmap ymap (mapping functions for x and y ordinates)
fmap (mapping function for result)
f (Realfunction2d)
The mapping functions are all Realfunction1d
s.
The function calculated is fmap{f[xmap(x),ymap(y)]}
.
This is a fairly general form, but is particularly useful
for changing units or scalings.