This file is indexed.

/usr/include/openturns/swig/NumericalMathFunctionImplementation_doc.i is in libopenturns-dev 1.7-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
%define OT_NumericalMathFunction_doc
"Function.

Available constructors:
    NumericalMathFunction(*filename*)

    NumericalMathFunction(*inputs, outputs, formulas*)

    NumericalMathFunction(*inputs, formulas*)

    NumericalMathFunction(*inputString, formulaString, outputString = 'outputVariable'*)

    NumericalMathFunction(*f, g*)

    NumericalMathFunction(*functionCollection*)

    NumericalMathFunction(*functionCollection, scalarCoefficientColl*)

    NumericalMathFunction(*scalarFunctionCollection, vectorCoefficientColl*)

    NumericalMathFunction(*function, comparisonOperator, threshold*)

    NumericalMathFunction(*function, indices, parametersSet=True*)

    NumericalMathFunction(*function, indices, referencePoint, parametersSet=True*)

    NumericalMathFunction(*inputSample, outputSample*)

Parameters
----------
fileName : str or :class:`~openturns.WrapperFile`
    A string to name the XML file (without the extension '.xml') which contains
    the implementation of the considered function.
inputs : sequence of str
    Ordered list of input variables names of the *NumericalMathFunction*.
outputs : sequence of str
    Ordered list of output variables names of the *NumericalMathFunction*.
    If it is not specified, default names are created for the output variables.
formulas : sequence of str
    Ordered list of analytical formulas between the inputs and the outputs.
    The *NumericalMathFunction* is defined by *ouputs = formulas(inputs)*.
inputString : str
    Description of the *NumericalMathFunction*'s input.
outputString : str
    Description of the *NumericalMathFunction*'s output.
formulaString : str
    Analytical formula of the *NumericalMathFunction*.
    The *NumericalMathFunction* is defined by
    *ouputString = formulaString(inputString)*.

    Available functions:

    - sin
    - cos
    - tan
    - asin
    - acos
    - atan
    - sinh
    - cosh
    - tanh
    - asinh
    - acosh
    - atanh
    - log2
    - log10
    - log
    - ln
    - lngamma
    - gamma
    - exp
    - erf
    - erfc
    - sqrt
    - cbrt
    - besselJ0
    - besselJ1
    - besselY0
    - besselY1
    - sign
    - rint
    - abs
    - floor
    - ceil
    - trunc
    - round
f,g : two :class:`~openturns.NumericalMathFunction`
    The *NumericalMathFunction* is the composition function :math:`f\\\\circ g`.
functionCollection : list of :class:`~openturns.NumericalMathFunction`
    Collection of several *NumericalMathFunction*.
scalarCoefficientColl : sequence of float
    Collection of scalar weights.
scalarFunctionCollection : list of :class:`~openturns.NumericalMathFunction`
    Collection of several scalar *NumericalMathFunction*.
vectorCoefficientColl : 2-d sequence of float
    Collection of vectorial weights.
function : :class:`~openturns.NumericalMathFunction`
    Function from which another function is created.
comparisonOperator : :class:`~openturns.ComparisonOperator`
    Comparison operator.
threshold : float
    Threshold from which values are compared.
indices : list of ints
    Indices of the set variables.
    If *referencePoint* is not mentioned, the variables are set to a null
    value. Otherwise, the variables are set to the *referencePoint*'s values.
parametersSet : bool
    If *True*, the set variables are the ones referenced in *indices*.
    Otherwise, the variables are the ones referenced in the complementary
    vector of *indices*.
referencePoint : sequence of float
    If not *referencePoint* take a null vector.
inputSample : 2-d sequence of float
    Values of the inputs.
outputSample : 2-d sequence of float
    Values of the outputs.

Examples
--------
Create a *NumericalMathFunction* from a list of analytical formulas and
descriptions of the inputs and the outputs :

>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x0', 'x1'], ['y0', 'y1'],
...                              ['x0 + x1', 'x0 - x1'])
>>> print(f([1, 2]))
[3,-1]


Create a *NumericalMathFunction* from strings:

>>> import openturns as ot
>>> f = ot.NumericalMathFunction('x', '2.0*sqrt(x)', 'y')
>>> print(f(([16],[4])))
    [ y ]
0 : [ 8 ]
1 : [ 4 ]


Create a *NumericalMathFunction* from a Python function:

>>> def a_function(X):
...     return [X[0] + X[1]]
>>> f = ot.PythonFunction(2, 1, a_function)
>>> print(f(((10, 5),(6, 7))))
    [ y0 ]
0 : [ 15 ]
1 : [ 13 ]


See :class:`~openturns.PythonFunction` for further details.

Create a *NumericalMathFunction* from another *NumericalMathFunction*:

>>> f = ot.NumericalMathFunction(ot.Description.BuildDefault(4, 'x'),
...                              ['x0', 'x0 + x1', 'x0 + x2 + x3'])

Then create another function by setting x1=0 and x3=0:

>>> g = ot.NumericalMathFunction(f, [3, 1], True)
>>> print(g.getInputDescription())
[x0,x2]
>>> print(g.getOutputDescription())
[y0,y1,y2]
>>> print(g((1, 2)))
[1,1,3]

Or by setting x1=4 and x3=10:

>>> g = ot.NumericalMathFunction(f, [3, 1], [6, 4, 5, 10], True)
>>> print(g((1, 2)))
[1,5,13]

Or by setting x0=6 and x2=5:

>>> g = ot.NumericalMathFunction(f, [3, 1], [6, 4, 5, 10], False)
>>> print(g.getInputDescription())
[x3,x1]
>>> print(g((1, 2)))
[6,8,12]


Create a *NumericalMathFunction* from another *NumericalMathFunction*
and by using a comparison operator:

>>> analytical = ot.NumericalMathFunction(['x0','x1'], ['y'], ['x0 + x1'])
>>> indicator = ot.NumericalMathFunction(analytical, ot.Less(), 0.0)
>>> print(indicator([2, 3]))
[0]
>>> print(indicator([2, -3]))
[1]

Create a *NumericalMathFunction* from a collection of functions:

>>> functions = list()
>>> functions.append(ot.NumericalMathFunction(['x1', 'x2', 'x3'], ['y1', 'y2'],
...                                      ['x1^2 + x2', 'x1 + x2 + x3']))
>>> functions.append(ot.NumericalMathFunction(['x1', 'x2', 'x3'], ['y1', 'y2'],
...                                      ['x1 + 2 * x2 + x3', 'x1 + x2 - x3']))
>>> myFunction = ot.NumericalMathFunction(functions)
>>> print(myFunction([1., 2., 3.]))
[3,6,8,0]

Create a *NumericalMathFunction* which is the linear combination *linComb*
of the functions defined in  *functionCollection* with scalar weights
defined in *scalarCoefficientColl*:

:math:`functionCollection  = (f_1, \\\\hdots, f_N)`
where :math:`\\\\forall 1 \\\\leq i \\\\leq N, \\\\,     f_i: \\\\Rset^n \\\\rightarrow \\\\Rset^{p}`
and :math:`scalarCoefficientColl = (c_1, \\\\hdots, c_N) \\\\in \\\\Rset^N`
then the linear combination is:

.. math::

    linComb: \\\\left|\\\\begin{array}{rcl}
                  \\\\Rset^n & \\\\rightarrow & \\\\Rset^{p} \\\\\\\\
                  \\\\vect{X} & \\\\mapsto & \\\\displaystyle \\\\sum_i c_if_i (\\\\vect{X})
              \\\\end{array}\\\\right.

>>> myFunction2 = ot.NumericalMathFunction(functions, [2., 4.])
>>> print(myFunction2([1., 2., 3.]))
[38,12]


Create a *NumericalMathFunction* which is the linear combination
*vectLinComb* of the scalar functions defined in
*scalarFunctionCollection* with vectorial weights defined in
*vectorCoefficientColl*:

If :math:`scalarFunctionCollection = (f_1, \\\\hdots, f_N)`
where :math:`\\\\forall 1 \\\\leq i \\\\leq N, \\\\,    f_i: \\\\Rset^n \\\\rightarrow \\\\Rset`
and :math:`vectorCoefficientColl = (\\\\vect{c}_1, \\\\hdots, \\\\vect{c}_N)`
where :math:`\\\\forall 1 \\\\leq i \\\\leq N, \\\\,   \\\\vect{c}_i \\\\in \\\\Rset^p`

.. math::

    vectLinComb: \\\\left|\\\\begin{array}{rcl}
                     \\\\Rset^n & \\\\rightarrow & \\\\Rset^{p} \\\\\\\\
                     \\\\vect{X} & \\\\mapsto & \\\\displaystyle \\\\sum_i \\\\vect{c}_if_i (\\\\vect{X})
                 \\\\end{array}\\\\right.

>>> functions=list()
>>> functions.append(ot.NumericalMathFunction(['x1', 'x2', 'x3'], ['y1'],
...                                           ['x1 + 2 * x2 + x3']))
>>> functions.append(ot.NumericalMathFunction(['x1', 'x2', 'x3'], ['y1'],
...                                           ['x1^2 + x2']))
>>> myFunction2 = ot.NumericalMathFunction(functions, [[2., 4.], [3., 1.]])
>>> print(myFunction2([1, 2, 3]))
[25,35]


Create a *NumericalMathFunction* from values of the inputs and the outputs:

>>> inputSample = [[1.0, 1.0], [2.0, 2.0]]
>>> outputSample = [[4.0], [5.0]]
>>> database = ot.NumericalMathFunction(inputSample, outputSample)
>>> x = [1.8]*database.getInputDimension()
>>> print(database(x))
[5]


Create a *NumericalMathFunction* which is the composition function
:math:`f\\\\circ g`:

>>> g = ot.NumericalMathFunction(['x1', 'x2'], ['y1', 'y2'],
...                              ['x1 + x2','3 * x1 * x2'])
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'], ['2 * x1 - x2'])
>>> composed = ot.NumericalMathFunction(f, g)
>>> print(composed([3, 4]))
[-22]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation
OT_NumericalMathFunction_doc

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

%define OT_NumericalMathFunction_GetValidFunctions_doc
"Return the list of valid functions.

Returns
-------
list_functions : :class:`~openturns.Description`
    List of the functions we can use within OpenTURNS.

Examples
--------
>>> import openturns as ot
>>> print(ot.NumericalMathFunction().GetValidFunctions()[0:2])
[sin(arg) -> sine function,cos(arg) -> cosine function]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::GetValidFunctions
OT_NumericalMathFunction_GetValidFunctions_doc

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

%define OT_NumericalMathFunction_GetValidConstants_doc
"Return the list of valid constants.

Returns
-------
list_constants : :class:`~openturns.Description`
    List of the constants we can use within OpenTURNS.

Examples
--------
>>> import openturns as ot
>>> print(ot.NumericalMathFunction().GetValidConstants()[0:2])
[_e -> Euler's constant (2.71828...),_pi -> Pi constant (3.14159...)]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::GetValidConstants
OT_NumericalMathFunction_GetValidConstants_doc

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

%define OT_NumericalMathFunction_GetValidOperators_doc
"Return the list of valid operators.

Returns
-------
list_operators : :class:`~openturns.Description`
    List of the operators we can use within OpenTURNS.

Examples
--------
>>> import openturns as ot
>>> print(ot.NumericalMathFunction().GetValidOperators()[0:2])
[= -> assignement, can only be applied to variable names (priority -1),and -> logical and (priority 1)]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::GetValidOperators
OT_NumericalMathFunction_GetValidOperators_doc

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

%define OT_NumericalMathFunction_enableCache_doc
"Enable the cache mechanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::enableCache
OT_NumericalMathFunction_enableCache_doc

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

%define OT_NumericalMathFunction_disableCache_doc
"Disable the cache mechanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::disableCache
OT_NumericalMathFunction_disableCache_doc

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

%define OT_NumericalMathFunction_clearCache_doc
"Empty the content of the cache."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::clearCache
OT_NumericalMathFunction_clearCache_doc

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

%define OT_NumericalMathFunction_isCacheEnabled_doc
"Test whether the cache mechanism is enabled or not.

Returns
-------
isCacheEnabled : bool
    Flag telling whether the cache mechanism is enabled.
    It is disabled by default."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::isCacheEnabled
OT_NumericalMathFunction_isCacheEnabled_doc

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

%define OT_NumericalMathFunction_getCacheHits_doc
"Accessor to the number of computations saved thanks to the cache mecanism.

Returns
-------
cacheHits : int
    Integer that counts the number of computations saved thanks to the cache
    mecanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getCacheHits
OT_NumericalMathFunction_getCacheHits_doc

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

%define OT_NumericalMathFunction_getCacheInput_doc
"Accessor to all the input numerical points stored in the cache mecanism.

Returns
-------
cacheInput : :class:`~openturns.NumericalSample`
    All the input numerical points stored in the cache mecanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getCacheInput
OT_NumericalMathFunction_getCacheInput_doc

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

%define OT_NumericalMathFunction_getCacheOutput_doc
"Accessor to all the output numerical points stored in the cache mecanism.

Returns
-------
cacheInput : :class:`~openturns.NumericalSample`
    All the output numerical points stored in the cache mecanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getCacheOutput
OT_NumericalMathFunction_getCacheOutput_doc

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

%define OT_NumericalMathFunction_addCacheContent_doc
"Add input numerical points and associated output to the cache.

Parameters
----------
input_sample : 2-d sequence of float
    Input numerical points to be added to the cache.
output_sample : 2-d sequence of float
    Output numerical points associated with the input_sample to be added to the
    cache."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::addCacheContent
OT_NumericalMathFunction_addCacheContent_doc

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

%define OT_NumericalMathFunction_enableHistory_doc
"Enable the history mechanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::enableHistory
OT_NumericalMathFunction_enableHistory_doc

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

%define OT_NumericalMathFunction_disableHistory_doc
"Disable the history mechanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::disableHistory
OT_NumericalMathFunction_disableHistory_doc

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

%define OT_NumericalMathFunction_clearHistory_doc
"Empty the content of the history."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::clearHistory
OT_NumericalMathFunction_clearHistory_doc

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

%define OT_NumericalMathFunction_isHistoryEnabled_doc
"Test whether the history mechanism is enabled or not.

Returns
-------
isHistoryEnabled : bool
    Flag telling whether the history mechanism is enabled.
    It is disabled by default."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::isHistoryEnabled
OT_NumericalMathFunction_isHistoryEnabled_doc

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

%define OT_NumericalMathFunction_getHistoryInput_doc
"Accessor to the history of the input values.

Returns
-------
input_history : :class:`~openturns.NumericalSample`
    All the input numerical points stored in the history mecanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getHistoryInput
OT_NumericalMathFunction_getHistoryInput_doc

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

%define OT_NumericalMathFunction_getHistoryOutput_doc
"Accessor to the history of the output values.

Returns
-------
output_history : :class:`~openturns.NumericalSample`
    All the output numerical points stored in the history mecanism."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getHistoryOutput
OT_NumericalMathFunction_getHistoryOutput_doc

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

%define OT_NumericalMathFunction_getCallsNumber_doc
"Accessor to the number of times the function has been called.

Returns
-------
calls_number : int
    Integer that counts the number of times the function has been called
    since its creation."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getCallsNumber
OT_NumericalMathFunction_getCallsNumber_doc

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

%define OT_NumericalMathFunction_getEvaluationCallsNumber_doc
"Accessor to the number of times the function has been called.

Returns
-------
evaluation_calls_number : int
    Integer that counts the number of times the function has been called
    since its creation."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getEvaluationCallsNumber
OT_NumericalMathFunction_getEvaluationCallsNumber_doc

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

%define OT_NumericalMathFunction_getGradientCallsNumber_doc
"Accessor to the number of times the gradient of the function has been called.

Returns
-------
gradient_calls_number : int
    Integer that counts the number of times the gradient of the
    NumericalMathFunction has been called since its creation.
    Note that if the gradient is implemented by a finite difference method,
    the gradient calls number is equal to 0 and the different calls are
    counted in the evaluation calls number."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getGradientCallsNumber
OT_NumericalMathFunction_getGradientCallsNumber_doc

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

%define OT_NumericalMathFunction_getHessianCallsNumber_doc
"Accessor to the number of times the hessian of the function has been called.

Returns
-------
hessian_calls_number : int
    Integer that counts the number of times the hessian of the
    NumericalMathFunction has been called since its creation.
    Note that if the hessian is implemented by a finite difference method,
    the hessian calls number is equal to 0 and the different calls are counted
    in the evaluation calls number."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getHessianCallsNumber
OT_NumericalMathFunction_getHessianCallsNumber_doc

// ---------------------------------------------------------------------
%define OT_NumericalMathFunction_getMarginal_doc
"Accessor to marginal.

Parameters
----------
indices : int or list of ints
    Set of indices for which the marginal is extracted.

Returns
-------
marginal : :class:`~openturns.NumericalMathFunction`
    Function corresponding to either :math:`f_i` or
    :math:`(f_i)_{i \\\\in indices}`, with :math:`f:\\\\Rset^n \\\\rightarrow \\\\Rset^p`
    and :math:`f=(f_0 , \\\\dots, f_{p-1})`."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getMarginal
OT_NumericalMathFunction_getMarginal_doc

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

%define OT_NumericalMathFunction_getImplementation_doc
"Accessor to the evaluation, gradient and hessian functions.

Returns
-------
function : :class:`~openturns.NumericalMathFunctionImplementation`
    The evaluation, gradient and hessian function.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> print(f.getImplementation())
input  : [x1,x2]
output : [y]
evaluation : 2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6
gradient   :
| d(y) / d(x1) = (1)+(4*x1)+((-4*((x2)*(sin(x1)))))
| d(y) / d(x2) = (8)+((4*(cos(x1)))) 

hessian    :
|    d^2(y) / d(x1)^2 = (4)+((-4*((x2)*(cos(x1)))))
| d^2(y) / d(x2)d(x1) = (-4*(sin(x1))) 
|    d^2(y) / d(x2)^2 = 0"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getImplementation
OT_NumericalMathFunction_getImplementation_doc

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

%define OT_NumericalMathFunction_getEvaluation_doc
"Accessor to the evaluation function.

Returns
-------
function : :class:`~openturns.NumericalMathEvaluationImplementation`
    The evaluation function.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> print(f.getEvaluation())
[x1,x2]->[2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getEvaluation
OT_NumericalMathFunction_getEvaluation_doc

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

%define OT_NumericalMathFunction_getGradient_doc
"Accessor to the gradient function.

Returns
-------
gradient : :class:`~openturns.NumericalMathGradientImplementation`
    The gradient function."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getGradient
OT_NumericalMathFunction_getGradient_doc

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

%define OT_NumericalMathFunction_getHessian_doc
"Accessor to the hessian function.

Returns
-------
hessian : :class:`~openturns.NumericalMathHessianImplementation`
    The hessian function."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getHessian
OT_NumericalMathFunction_getHessian_doc

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

%define OT_NumericalMathFunction_setEvaluation_doc
"Accessor to the evaluation function.

Parameters
----------
function : :class:`~openturns.NumericalMathEvaluationImplementation`
    The evaluation function."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::setEvaluation
OT_NumericalMathFunction_setEvaluation_doc

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

%define OT_NumericalMathFunction_setGradient_doc
"Accessor to the gradient function.

Parameters
----------
gradient_function : :class:`~openturns.NumericalMathGradientImplementation`
    The gradient function.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> f.setGradient(ot.CenteredFiniteDifferenceGradient(
...  ot.ResourceMap.GetAsNumericalScalar('CenteredFiniteDifferenceGradient-DefaultEpsilon'),
...  f.getEvaluation()))"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::setGradient
OT_NumericalMathFunction_setGradient_doc

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

%define OT_NumericalMathFunction_setHessian_doc
"Accessor to the hessian function.

Parameters
----------
hessian_function : :class:`~openturns.NumericalMathHessianImplementation`
    The hessian function.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> f.setHessian(ot.CenteredFiniteDifferenceHessian(
...  ot.ResourceMap.GetAsNumericalScalar('CenteredFiniteDifferenceHessian-DefaultEpsilon'),
...  f.getEvaluation()))"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::setHessian
OT_NumericalMathFunction_setHessian_doc

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

%define OT_NumericalMathFunction_gradient_doc
"Return the Jacobian transposed matrix of the function at a point.

Parameters
----------
point : sequence of float
    Point where the Jacobian transposed matrix is calculated.

Returns
-------
gradient : :class:`~openturns.Matrix`
    The Jacobian transposed matrix of the function at *point*.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y','z'],
...                ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6','x1 + x2'])
>>> print(f.gradient([3.14, 4]))
[[ 13.5345   1       ]
 [  4.00001  1       ]]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::gradient
OT_NumericalMathFunction_gradient_doc

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

%define OT_NumericalMathFunction_hessian_doc
"Return the hessian of the function at a point.

Parameters
----------
point : sequence of float
    Point where the hessian of the function is calculated.

Returns
-------
hessian : :class:`~openturns.SymmetricTensor`
    Hessian of the function at *point*.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y','z'],
...                ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6','x1 + x2'])
>>> print(f.hessian([3.14, 4]))
sheet #0
[[ 20          -0.00637061 ]
 [ -0.00637061  0          ]]
sheet #1
[[  0           0          ]
 [  0           0          ]]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::hessian
OT_NumericalMathFunction_hessian_doc

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

%define OT_NumericalMathFunction_getDescription_doc
"Accessor to the description of the inputs and outputs.

Returns
-------
description : :class:`~openturns.Description`
    Description of the inputs and the outputs.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> print(f.getDescription())
[x1,x2,y]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getDescription
OT_NumericalMathFunction_getDescription_doc

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

%define OT_NumericalMathFunction_setDescription_doc
"Accessor to the description of the inputs and outputs.

Parameters
----------
description : sequence of str
    Description of the inputs and the outputs.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> print(f.getDescription())
[x1,x2,y]
>>> f.setDescription(['a','b','y'])
>>> print(f.getDescription())
[a,b,y]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::setDescription
OT_NumericalMathFunction_setDescription_doc

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

%define OT_NumericalMathFunction_getInputDescription_doc
"Accessor to the description of the inputs.

Returns
-------
description : :class:`~openturns.Description`
    Description of the inputs.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> print(f.getInputDescription())
[x1,x2]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getInputDescription
OT_NumericalMathFunction_getInputDescription_doc

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

%define OT_NumericalMathFunction_getOutputDescription_doc
"Accessor to the description of the outputs.

Returns
-------
description : :class:`~openturns.Description`
    Description of the outputs.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> print(f.getOutputDescription())
[y]"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getOutputDescription
OT_NumericalMathFunction_getOutputDescription_doc

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

%define OT_NumericalMathFunction_getInputDimension_doc
"Accessor to the number of the inputs.

Returns
-------
number_inputs : int
    Number of inputs.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> print(f.getInputDimension())
2"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getInputDimension
OT_NumericalMathFunction_getInputDimension_doc

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

%define OT_NumericalMathFunction_getOutputDimension_doc
"Accessor to the number of the outputs.

Returns
-------
number_outputs : int
    Number of outputs.

Examples
--------
>>> import openturns as ot
>>> f = ot.NumericalMathFunction(['x1', 'x2'], ['y'],
...                          ['2 * x1^2 + x1 + 8 * x2 + 4 * cos(x1) * x2 + 6'])
>>> print(f.getOutputDimension())
1"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getOutputDimension
OT_NumericalMathFunction_getOutputDimension_doc

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

%define OT_NumericalMathFunction_getParameterDimension_doc
"Accessor to the dimension of the parameter.

Returns
-------
parameterDimension : int
    Dimension of the parameter."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getParameterDimension
OT_NumericalMathFunction_getParameterDimension_doc

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

%define OT_NumericalMathFunction_draw_doc
"Draw the output of function as a :class:`~openturns.Graph`.

Available usages:
    draw(*inputMarg, outputMarg, CP, xiMin, xiMax, ptNb*)

    draw(*firstInputMarg, secondInputMarg, outputMarg, CP, xiMin_xjMin, xiMax_xjMax, ptNbs*)

    draw(*xiMin, xiMax, ptNb*)

    draw(*xiMin_xjMin, xiMax_xjMax, ptNbs*)

Parameters
----------
outputMarg, inputMarg : int, :math:`outputMarg, inputMarg \\\\geq 0`
    *outputMarg* is the index of the marginal to draw as a function of the marginal
    with index *inputMarg*.
firstInputMarg, secondInputMarg : int, :math:`firstInputMarg, secondInputMarg \\\\geq 0`
    In the 2D case, the marginal *outputMarg* is drawn as a function of the
    two marginals with indexes *firstInputMarg* and *secondInputMarg*.
CP : sequence of float
    Central point.
xiMin, xiMax : float
    Define the interval where the curve is plotted.
xiMin_xjMin, xiMax_xjMax : sequence of float of dimension 2.
    In the 2D case, define the intervals where the curves are plotted.
ptNb : int :math:`ptNb > 0` or list of ints of dimension 2 :math:`ptNb_k > 0, k=1,2`
    The number of points to draw the curves.

Notes
-----
We note :math:`f: \\\\Rset^n \\\\rightarrow \\\\Rset^p`
where :math:`\\\\vect{x} = (x_1, \\\\dots, x_n)` and
:math:`f(\\\\vect{x}) = (f_1(\\\\vect{x}), \\\\dots,f_p(\\\\vect{x}))`,
with :math:`n\\\\geq 1` and :math:`p\\\\geq 1`.

- In the first usage:

Draws graph of the given 1D *outputMarg* marginal
:math:`f_k: \\\\Rset^n \\\\rightarrow \\\\Rset` as a function of the given 1D *inputMarg*
marginal with respect to the variation of :math:`x_i` in the interval
:math:`[x_i^{min}, x_i^{max}]`, when all the other components of
:math:`\\\\vect{x}` are fixed to the corresponding ones of the central point *CP*.
Then OpenTURNS draws the graph:
: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)`.

- In the second usage:

Draws the iso-curves of the given *outputMarg* marginal :math:`f_k` as a
function of the given 2D *firstInputMarg* and *secondInputMarg* marginals
with respect to the variation of :math:`(x_i, x_j)` in the interval
:math:`[x_i^{min}, x_i^{max}] \\\\times [x_j^{min}, x_j^{max}]`, when all the
other components of :math:`\\\\vect{x}` are fixed to the corresponding ones of the
central point *CP*. Then OpenTURNS draws the graph:
: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)`.

- In the third usage:

The same as the first usage but only for function :math:`f: \\\\Rset \\\\rightarrow \\\\Rset`.

- In the fourth usage:

The same as the second usage but only for function :math:`f: \\\\Rset^2 \\\\rightarrow \\\\Rset`.


Examples
--------
>>> import openturns as ot
>>> from openturns.viewer import View
>>> f = ot.NumericalMathFunction('x', 'sin(2*_pi*x)*exp(-x^2/2)', 'y')
>>> graph = f.draw(-1.2, 1.2, 100)
>>> View(graph).show()"
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::draw
OT_NumericalMathFunction_draw_doc

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

%define OT_NumericalMathFunction_getParameter_doc
"Accessor to the parameter.

Returns
-------
parameter : :class:`~openturns.NumericalPointWithDescription`
    The parameter values."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::getParameter
OT_NumericalMathFunction_getParameter_doc

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

%define OT_NumericalMathFunction_setParameter_doc
"Accessor to the parameter.

Parameters
----------
parameter : :class:`~openturns.NumericalPointWithDescription`
    The parameter values."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::setParameter
OT_NumericalMathFunction_setParameter_doc

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

%define OT_NumericalMathFunction_parameterGradient_doc
"Accessor to the gradient against the parameter.

Returns
-------
gradient : :class:`~openturns.Matrix`
    The gradient."
%enddef
%feature("docstring") OT::NumericalMathFunctionImplementation::parameterGradient
OT_NumericalMathFunction_parameterGradient_doc