\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
py_fun_obj¶
View page sourcePython Function Object¶
Syntax¶
.setup ( option ).domain ( ).range ( ).option ()fun_obj¶
This is the function object. The corresponding function call, y = fun ( x ), computes y as a function of x .
Scalar Type¶
We call this a Scalar function object where Scalar is defined as follows.
If all of the elements of x and y have the type float ,
Scalar is float .
Otherwise, there can be at most one other type for elements of x and y
and Scalar is that type.
domain¶
The return value is the dimension of the domain space for this function; i.e. the size of x. It likely depends on the value of option.
range¶
The return value is the dimension of the range space for this function; i.e. the size of y. It likely depends on the value of option.
setup¶
The function object is initialized using this syntax.
option¶
This interface does not place any restrictions on the content of option .
n¶
This return value is the dimension of the domain space for this function; i.e. the length of x. It likely depends on the value of option.
m¶
This return value is the dimension of the range space for this function; i.e. the length of y. It likely depends on the value of option.
x¶
is a vector like object such that
n is equal len(x) .
In addition is supports x[i] for indices i less than n .
y¶
is a vector like object that contains the function value
corresponding to the argument x .
It supports y[i] for indices i less than m .