%feature("docstring") OT::VertexValueFunction
"Function mapping a field to a field.

Available constructors:
    VertexValueFunction(*spatialDim=1*)

    VertexValueFunction(*h, spatialDim=1*)

Parameters
----------
l : :class:`~openturns.Function`
    Function :math:`\ell: \Rset^n \times \Rset^d \rightarrow \Rset^{d'}`.
spatialDim : int, :math:`\geq 1`
    Dimension :math:`n` of the domain :math:`\cD`

Notes
-----
Vertex value functions act on fields to produce fields such that:

.. math::

    f: \left| \begin{array}{rcl}
               \cM_N \times (\Rset^d)^N & \rightarrow & \cM_N \times (\Rset^{d'})^{N} \\
                F & \mapsto & F'
              \end{array} \right.

with :math:`F = (\vect{t}_i, \vect{v}_i)_{1 \leq i \leq N}`, :math:`F' = (\vect{t}_i, \vect{v}'_i)_{1 \leq i \leq N}` and :math:`\cM_{N}` a mesh of :math:`\cD \subset \Rset^{n}`.

A vertex value function keeps the mesh unchanged: the input mesh is equal to the output mesh.

The  field :math:`F'` is defined by the function :math:`\ell: \Rset^n \times \Rset^d \rightarrow \Rset^{d'}`:

.. math::

    \forall \vect{t}_i \in \cM_N, \quad \vect{v}'_i = \ell(\vect{t}_i, \vect{v}_i)
 
When :math:`\ell` is not specified, the constructor builds an object which evaluation operator is not defined (it throws a *NotYetImplementedException*). The instanciation of such an object is used to extract an actual :class:`~openturns.VertexValueFunction` from a  :class:`~openturns.Study`.


See also
--------
FieldFunction, ValueFunction, VertexValueFunction

Examples
--------
>>> import openturns as ot

Create a function :math:`\ell : \Rset \times \Rset \rightarrow \Rset` such as:

.. math::

    h: \left|\begin{array}{rcl}
                \Rset \times \Rset & \rightarrow & \Rset \\
                (t, x) & \mapsto & (x + t^2)
            \end{array}\right.

>>> h = ot.SymbolicFunction(['t', 'x'], ['x + t^2'])

Convert :math:`h` into a vertex value function with :math:`n=1`:

>>> n = 1
>>> myVertexValueFunction = ot.VertexValueFunction(h, n)
>>> # Create a TimeSeries
>>> tg = ot.RegularGrid(0.0, 0.2, 6)
>>> data = ot.Sample(tg.getN(), h.getInputDimension()-1)
>>> for i in range(data.getSize()):
...     for j in range(data.getDimension()):
...         data[i, j] = i * data.getDimension() + j
>>> ts = ot.TimeSeries(tg, data)
>>> print(ts)
    [ t   v0  ]
0 : [ 0   0   ]
1 : [ 0.2 1   ]
2 : [ 0.4 2   ]
3 : [ 0.6 3   ]
4 : [ 0.8 4   ]
5 : [ 1   5   ]
>>> print(myVertexValueFunction(ts))
    [ t    y0   ]
0 : [ 0    0    ]
1 : [ 0.2  1.04 ]
2 : [ 0.4  2.16 ]
3 : [ 0.6  3.36 ]
4 : [ 0.8  4.64 ]
5 : [ 1    6    ]"

// ---------------------------------------------------------------------

%feature("docstring") OT::VertexValueFunction::getFunction
"Get the function of :math:`\ell`.

Returns
-------
l : :class:`~openturns.Function`
   Function :math:`\ell: \Rset^n \times \Rset^d \rightarrow \Rset^{d'}`.

Examples
--------
>>> import openturns as ot
>>> h = ot.SymbolicFunction(['t', 'x'], ['x + t^2'])
>>> n = 1
>>> myVertexValueFunction = ot.ValueFunction(h, n)
>>> print(myVertexValueFunction.getFunction())
[t,x]->[x + t^2]"

// ---------------------------------------------------------------------

%feature("docstring") OT::VertexValueFunction::getMarginal
"Get the marginal(s) at given indice(s).

Parameters
----------
i : int or list of ints, :math:`0 \leq i < d'`
    Indice(s) of the marginal(s) to be extracted.

Returns
-------
function : :class:`~openturns.VertexValueFunction`
    The initial function restricted to the concerned marginal(s) at the indice(s)
    :math:`i`."


// ---------------------------------------------------------------------

%feature("docstring") OT::VertexValueFunction::getOutputMesh
"Get the mesh associated to the output domain.

Returns
-------
outputMesh : :class:`~openturns.Mesh`
    The output mesh which is equal to the input one: :math:`\cM_{N}`."





