1%define OT_Evaluation_doc 2"Numerical math evaluation implementation. 3 4Available constructors: 5 EvaluationImplementation() 6 7See also 8-------- 9Function, AggregatedEvaluation, 10DatabaseEvaluation, 11DualLinearCombinationEvaluation, LinearFunction 12" 13%enddef 14%feature("docstring") OT::EvaluationImplementation 15OT_Evaluation_doc 16 17// --------------------------------------------------------------------- 18 19%define OT_Evaluation_getCallsNumber_doc 20"Accessor to the number of times the function has been called. 21 22Returns 23------- 24calls_number : int 25 Integer that counts the number of times the function has been called 26 since its creation." 27%enddef 28%feature("docstring") OT::EvaluationImplementation::getCallsNumber 29OT_Evaluation_getCallsNumber_doc 30 31// --------------------------------------------------------------------- 32 33%define OT_Evaluation_getDescription_doc 34"Accessor to the description of the inputs and outputs. 35 36Returns 37------- 38description : :class:`~openturns.Description` 39 Description of the inputs and the outputs. 40 41Examples 42-------- 43>>> import openturns as ot 44>>> f = ot.SymbolicFunction(['x1', 'x2'], 45... ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6']) 46>>> print(f.getDescription()) 47[x1,x2,y0]" 48%enddef 49%feature("docstring") OT::EvaluationImplementation::getDescription 50OT_Evaluation_getDescription_doc 51 52// --------------------------------------------------------------------- 53 54%define OT_Evaluation_getInputDescription_doc 55"Accessor to the description of the inputs. 56 57Returns 58------- 59description : :class:`~openturns.Description` 60 Description of the inputs. 61 62Examples 63-------- 64>>> import openturns as ot 65>>> f = ot.SymbolicFunction(['x1', 'x2'], 66... ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6']) 67>>> print(f.getInputDescription()) 68[x1,x2]" 69%enddef 70%feature("docstring") OT::EvaluationImplementation::getInputDescription 71OT_Evaluation_getInputDescription_doc 72 73// --------------------------------------------------------------------- 74 75%define OT_Evaluation_getInputDimension_doc 76"Accessor to the number of the inputs. 77 78Returns 79------- 80number_inputs : int 81 Number of inputs. 82 83Examples 84-------- 85>>> import openturns as ot 86>>> f = ot.SymbolicFunction(['x1', 'x2'], 87... ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6']) 88>>> print(f.getInputDimension()) 892" 90%enddef 91%feature("docstring") OT::EvaluationImplementation::getInputDimension 92OT_Evaluation_getInputDimension_doc 93 94// --------------------------------------------------------------------- 95 96%define OT_Evaluation_getMarginal_doc 97"Accessor to marginal. 98 99Parameters 100---------- 101indices : int or list of ints 102 Set of indices for which the marginal is extracted. 103 104Returns 105------- 106marginal : :class:`~openturns.Function` 107 Function corresponding to either :math:`f_i` or 108 :math:`(f_i)_{i \in indices}`, with :math:`f:\Rset^n \rightarrow \Rset^p` 109 and :math:`f=(f_0 , \dots, f_{p-1})`." 110%enddef 111%feature("docstring") OT::EvaluationImplementation::getMarginal 112OT_Evaluation_getMarginal_doc 113 114// --------------------------------------------------------------------- 115 116%define OT_Evaluation_getOutputDescription_doc 117"Accessor to the description of the outputs. 118 119Returns 120------- 121description : :class:`~openturns.Description` 122 Description of the outputs. 123 124Examples 125-------- 126>>> import openturns as ot 127>>> f = ot.SymbolicFunction(['x1', 'x2'], 128... ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6']) 129>>> print(f.getOutputDescription()) 130[y0]" 131%enddef 132%feature("docstring") OT::EvaluationImplementation::getOutputDescription 133OT_Evaluation_getOutputDescription_doc 134 135// --------------------------------------------------------------------- 136 137%define OT_Evaluation_getOutputDimension_doc 138"Accessor to the number of the outputs. 139 140Returns 141------- 142number_outputs : int 143 Number of outputs. 144 145Examples 146-------- 147>>> import openturns as ot 148>>> f = ot.SymbolicFunction(['x1', 'x2'], 149... ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6']) 150>>> print(f.getOutputDimension()) 1511" 152%enddef 153%feature("docstring") OT::EvaluationImplementation::getOutputDimension 154OT_Evaluation_getOutputDimension_doc 155 156// --------------------------------------------------------------------- 157 158%define OT_Evaluation_getParameterDimension_doc 159"Accessor to the dimension of the parameter. 160 161Returns 162------- 163parameter_dimension : int 164 Dimension of the parameter." 165%enddef 166%feature("docstring") OT::EvaluationImplementation::getParameterDimension 167OT_Evaluation_getParameterDimension_doc 168 169// --------------------------------------------------------------------- 170 171%define OT_Evaluation_setDescription_doc 172"Accessor to the description of the inputs and outputs. 173 174Parameters 175---------- 176description : sequence of str 177 Description of the inputs and the outputs. 178 179Examples 180-------- 181>>> import openturns as ot 182>>> f = ot.SymbolicFunction(['x1', 'x2'], 183... ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6']) 184>>> print(f.getDescription()) 185[x1,x2,y0] 186>>> f.setDescription(['a','b','y']) 187>>> print(f.getDescription()) 188[a,b,y]" 189%enddef 190%feature("docstring") OT::EvaluationImplementation::setDescription 191OT_Evaluation_setDescription_doc 192 193// --------------------------------------------------------------------- 194 195%define OT_Evaluation_setInputDescription_doc 196"Accessor to the description of the inputs. 197 198Returns 199------- 200description : :class:`~openturns.Description` 201 Description of the inputs." 202%enddef 203%feature("docstring") OT::EvaluationImplementation::setInputDescription 204OT_Evaluation_setInputDescription_doc 205 206// --------------------------------------------------------------------- 207 208%define OT_Evaluation_setOutputDescription_doc 209"Accessor to the description of the outputs. 210 211Returns 212------- 213description : :class:`~openturns.Description` 214 Description of the outputs." 215%enddef 216%feature("docstring") OT::EvaluationImplementation::setOutputDescription 217OT_Evaluation_setOutputDescription_doc 218 219// --------------------------------------------------------------------- 220 221%define OT_Evaluation_parameterGradient_doc 222"Gradient against the parameters. 223 224Parameters 225---------- 226x : sequence of float 227 Input point 228 229Returns 230------- 231parameter_gradient : :class:`~openturns.Matrix` 232 The parameters gradient computed at x." 233%enddef 234%feature("docstring") OT::EvaluationImplementation::parameterGradient 235OT_Evaluation_parameterGradient_doc 236 237// --------------------------------------------------------------------- 238 239%define OT_Evaluation_getParameter_doc 240"Accessor to the parameter values. 241 242Returns 243------- 244parameter : :class:`~openturns.Point` 245 The parameter values." 246%enddef 247%feature("docstring") OT::EvaluationImplementation::getParameter 248OT_Evaluation_getParameter_doc 249 250// --------------------------------------------------------------------- 251 252%define OT_Evaluation_setParameter_doc 253"Accessor to the parameter values. 254 255Parameters 256---------- 257parameter : sequence of float 258 The parameter values." 259%enddef 260%feature("docstring") OT::EvaluationImplementation::setParameter 261OT_Evaluation_setParameter_doc 262 263// --------------------------------------------------------------------- 264 265%define OT_Evaluation_getParameterDescription_doc 266"Accessor to the parameter description. 267 268Returns 269------- 270parameter : :class:`~openturns.Description` 271 The parameter description." 272%enddef 273%feature("docstring") OT::EvaluationImplementation::getParameterDescription 274OT_Evaluation_getParameterDescription_doc 275 276// --------------------------------------------------------------------- 277 278%define OT_Evaluation_setParameterDescription_doc 279"Accessor to the parameter description. 280 281Parameters 282---------- 283parameter : :class:`~openturns.Description` 284 The parameter description." 285%enddef 286%feature("docstring") OT::EvaluationImplementation::setParameterDescription 287OT_Evaluation_setParameterDescription_doc 288 289// --------------------------------------------------------------------- 290 291%define OT_Evaluation_draw_doc 292"Draw the output of function as a :class:`~openturns.Graph`. 293 294Available usages: 295 draw(*inputMarg, outputMarg, CP, xiMin, xiMax, ptNb*) 296 297 draw(*firstInputMarg, secondInputMarg, outputMarg, CP, xiMin_xjMin, xiMax_xjMax, ptNbs*) 298 299 draw(*xiMin, xiMax, ptNb*) 300 301 draw(*xiMin_xjMin, xiMax_xjMax, ptNbs*) 302 303Parameters 304---------- 305outputMarg, inputMarg : int, :math:`outputMarg, inputMarg \geq 0` 306 *outputMarg* is the index of the marginal to draw as a function of the marginal 307 with index *inputMarg*. 308firstInputMarg, secondInputMarg : int, :math:`firstInputMarg, secondInputMarg \geq 0` 309 In the 2D case, the marginal *outputMarg* is drawn as a function of the 310 two marginals with indexes *firstInputMarg* and *secondInputMarg*. 311CP : sequence of float 312 Central point. 313xiMin, xiMax : float 314 Define the interval where the curve is plotted. 315xiMin_xjMin, xiMax_xjMax : sequence of float of dimension 2. 316 In the 2D case, define the intervals where the curves are plotted. 317ptNb : int :math:`ptNb > 0` or list of ints of dimension 2 :math:`ptNb_k > 0, k=1,2` 318 The number of points to draw the curves. 319 320Notes 321----- 322We note :math:`f: \Rset^n \rightarrow \Rset^p` 323where :math:`\vect{x} = (x_1, \dots, x_n)` and 324:math:`f(\vect{x}) = (f_1(\vect{x}), \dots,f_p(\vect{x}))`, 325with :math:`n\geq 1` and :math:`p\geq 1`. 326 327- In the first usage: 328 329Draws graph of the given 1D *outputMarg* marginal 330:math:`f_k: \Rset^n \rightarrow \Rset` as a function of the given 1D *inputMarg* 331marginal with respect to the variation of :math:`x_i` in the interval 332:math:`[x_i^{min}, x_i^{max}]`, when all the other components of 333:math:`\vect{x}` are fixed to the corresponding ones of the central point *CP*. 334Then it draws the graph: 335:math:`t\in [x_i^{min}, x_i^{max}] \mapsto f_k(CP_1, \dots, CP_{i-1}, t, CP_{i+1} \dots, CP_n)`. 336 337- In the second usage: 338 339Draws the iso-curves of the given *outputMarg* marginal :math:`f_k` as a 340function of the given 2D *firstInputMarg* and *secondInputMarg* marginals 341with respect to the variation of :math:`(x_i, x_j)` in the interval 342:math:`[x_i^{min}, x_i^{max}] \times [x_j^{min}, x_j^{max}]`, when all the 343other components of :math:`\vect{x}` are fixed to the corresponding ones of the 344central point *CP*. Then it draws the graph: 345:math:`(t,u) \in [x_i^{min}, x_i^{max}] \times [x_j^{min}, x_j^{max}] \mapsto f_k(CP_1, \dots, CP_{i-1}, t, CP_{i+1}, \dots, CP_{j-1}, u, CP_{j+1} \dots, CP_n)`. 346 347- In the third usage: 348 349The same as the first usage but only for function :math:`f: \Rset \rightarrow \Rset`. 350 351- In the fourth usage: 352 353The same as the second usage but only for function :math:`f: \Rset^2 \rightarrow \Rset`. 354 355 356Examples 357-------- 358>>> import openturns as ot 359>>> from openturns.viewer import View 360>>> f = ot.SymbolicFunction(['x'], ['sin(2*pi_*x)*exp(-x^2/2)']) 361>>> graph = f.draw(-1.2, 1.2, 100) 362>>> View(graph).show()" 363%enddef 364%feature("docstring") OT::EvaluationImplementation::draw 365OT_Evaluation_draw_doc 366 367// --------------------------------------------------------------------- 368 369%feature("docstring") OT::EvaluationImplementation::isActualImplementation 370"Accessor to the validity flag. 371 372Returns 373------- 374is_impl : bool 375 Whether the implementation is valid." 376 377// --------------------------------------------------------------------- 378 379%define OT_Evaluation_isLinear_doc 380"Accessor to the linearity of the evaluation. 381 382Returns 383------- 384linear : bool 385 *True* if the evaluation is linear, *False* otherwise." 386%enddef 387%feature("docstring") OT::EvaluationImplementation::isLinear 388OT_Evaluation_isLinear_doc 389 390// --------------------------------------------------------------------- 391 392%define OT_Evaluation_isLinearlyDependent_doc 393"Accessor to the linearity of the evaluation with regard to a specific variable. 394 395Parameters 396---------- 397index : int 398 The index of the variable with regard to which linearity is evaluated. 399 400Returns 401------- 402linear : bool 403 *True* if the evaluation is linearly dependent on the specified variable, *False* otherwise." 404%enddef 405%feature("docstring") OT::EvaluationImplementation::isLinearlyDependent 406OT_Evaluation_isLinearlyDependent_doc 407 408// --------------------------------------------------------------------- 409 410%define OT_Evaluation_setCheckOutput_doc 411"Accessor to the output verification flag. 412 413Parameters 414---------- 415check_output : bool 416 Whether to check return values for nan or inf." 417%enddef 418%feature("docstring") OT::EvaluationImplementation::setCheckOutput 419OT_Evaluation_setCheckOutput_doc 420 421// --------------------------------------------------------------------- 422 423%define OT_Evaluation_getCheckOutput_doc 424"Accessor to the output verification flag. 425 426Returns 427------- 428check_output : bool 429 Whether to check return values for nan or inf." 430%enddef 431%feature("docstring") OT::EvaluationImplementation::getCheckOutput 432OT_Evaluation_getCheckOutput_doc 433