1%feature("docstring") OT::LinearCombinationFunction
2"Linear combination of functions.
3
4Allows to create a function which is the linear combination of functions
5with scalar weights.
6
7:math:`functionCollection  = (f_1, \hdots, f_N)`
8where :math:`\forall 1 \leq i \leq N, \,     f_i: \Rset^n \rightarrow \Rset^{p}`
9and :math:`scalarCoefficientColl = (c_1, \hdots, c_N) \in \Rset^N`
10then the linear combination is:
11
12.. math::
13
14    linComb  \left|\begin{array}{rcl}
15                  \Rset^n & \rightarrow & \Rset^{p} \\
16                  \vect{X} & \mapsto & \displaystyle \sum_{i=1}^N c_i f_i (\vect{X})
17              \end{array}\right.
18
19Parameters
20----------
21functionCollection : sequence of :class:`~openturns.Function`
22    Collection of functions to sum.
23scalarCoefficientColl : sequence of float
24    Collection of scalar weights.
25
26Examples
27--------
28>>> import openturns as ot
29>>> f1 = ot.SymbolicFunction(['x'], ['sin(x)'])
30>>> f2 = ot.SymbolicFunction(['x'], ['x'])
31>>> f3 = ot.SymbolicFunction(['x'], ['cos(x)'])
32>>> f = ot.LinearCombinationFunction([f1, f2, f3], [1.0, 2.0, 3.0])
33
34Evaluate the function:
35
36>>> x = [1.0]
37>>> y = f(x)"
38