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

    VertexFunction(*h*)

Parameters
----------
h : :class:`~openturns.Function`
    Function  :math:`h: \Rset^n \rightarrow \Rset^{d'}`.

Notes
-----
Vertex 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 function keeps the mesh unchanged: the input mesh is equal to the output mesh.

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

.. math::

    \forall \vect{t}_i \in \cM_N, \quad   \vect{v}'_i = h(\vect{t}_i)
 

When :math:`h` 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.VertexFunction` from a  :class:`~openturns.Study`.
  
See also
--------
FieldFunction, ValueFunction, VertexValueFunction

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

Create a function :math:`h : \Rset \rightarrow \Rset` such that:

.. math::

    h: \left|\begin{array}{rcl}
                \Rset & \rightarrow & \Rset \\
                t & \mapsto & t^2
            \end{array}\right.

>>> h = ot.SymbolicFunction('t', 't^2')

Convert :math:`h` into a vertex function:

>>> myVertexFunction = ot.VertexFunction(h)
>>> # Create a TimeSeries
>>> tg = ot.RegularGrid(0.0, 0.2, 6)
>>> data = ot.Sample(tg.getN(), h.getInputDimension())
>>> 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(myVertexFunction(ts))
    [ t    y0   ]
0 : [ 0    0    ]
1 : [ 0.2  0.04 ]
2 : [ 0.4  0.16 ]
3 : [ 0.6  0.36 ]
4 : [ 0.8  0.64 ]
5 : [ 1    1    ]
"

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

%feature("docstring") OT::VertexFunction::getFunction
"Get the function :math:`h`.

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

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

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

%feature("docstring") OT::VertexFunction::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.VertexFunction`
    The initial function restricted to the concerned marginal(s) at the indice(s)
    :math:`i`."

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

%feature("docstring") OT::VertexFunction::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}`."



