This file is indexed.

/usr/lib/python2.7/dist-packages/openturns/analytical.py is in python-openturns 1.9-5.

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
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

"""Analytical uncertainty propagation algorithms."""


from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_analytical')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_analytical')
    _analytical = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_analytical', [dirname(__file__)])
        except ImportError:
            import _analytical
            return _analytical
        try:
            _mod = imp.load_module('_analytical', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _analytical = swig_import_helper()
    del swig_import_helper
else:
    import _analytical
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

class SwigPyIterator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SwigPyIterator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SwigPyIterator, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _analytical.delete_SwigPyIterator
    __del__ = lambda self: None

    def value(self):
        return _analytical.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _analytical.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _analytical.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _analytical.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _analytical.SwigPyIterator_equal(self, x)

    def copy(self):
        return _analytical.SwigPyIterator_copy(self)

    def next(self):
        return _analytical.SwigPyIterator_next(self)

    def __next__(self):
        return _analytical.SwigPyIterator___next__(self)

    def previous(self):
        return _analytical.SwigPyIterator_previous(self)

    def advance(self, n):
        return _analytical.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _analytical.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _analytical.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _analytical.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _analytical.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _analytical.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _analytical.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self
SwigPyIterator_swigregister = _analytical.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

GCC_VERSION = _analytical.GCC_VERSION

class TestFailed:
    """TestFailed is used to raise an uniform exception in tests."""

    __type = "TestFailed"

    def __init__(self, reason=""):
        self.reason = reason

    def type(self):
        return TestFailed.__type

    def what(self):
        return self.reason

    def __str__(self):
        return TestFailed.__type + ": " + self.reason

    def __lshift__(self, ch):
        self.reason += ch
        return self

import openturns.base
import openturns.common
import openturns.typ
import openturns.statistics
import openturns.graph
import openturns.func
import openturns.geom
import openturns.diff
import openturns.optim
import openturns.experiment
import openturns.solver
import openturns.algo
import openturns.model_copula
import openturns.metamodel
import openturns.weightedexperiment
import openturns.orthogonalbasis
import openturns.randomvector
import openturns.transformation
class AnalyticalResult(openturns.common.PersistentObject):
    """
    Analytical result.

    Available constructors:
        AnalyticalResult(*designPoint, limitStateVariable, isInFailureSpace*)

    Notes
    -----
    Structure created by the method run() of the :class:`~openturns.Analytical`
    class and obtained thanks to its method getAnalyticalResult().

    Parameters
    ----------
    designPoint : sequence of float
        Design point in the standard space resulting from the optimization
        algorithm.
    limitStateVariable : :class:`~openturns.Event`
        Event of which the probability is calculated.
    isInFailureSpace : bool
        Indicates whether the origin of the standard space is in the failure space.
    """

    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, AnalyticalResult, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, AnalyticalResult, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _analytical.AnalyticalResult_getClassName(self)

    ELLIPTICAL = _analytical.AnalyticalResult_ELLIPTICAL
    CLASSICAL = _analytical.AnalyticalResult_CLASSICAL
    PHYSICAL = _analytical.AnalyticalResult_PHYSICAL

    def getStandardSpaceDesignPoint(self):
        """
        Accessor to the design point in the standard space.

        Returns
        -------
        designPoint : :class:`~openturns.Point`
            Design point in the standard space resulting from the optimization
            algorithm.
        """
        return _analytical.AnalyticalResult_getStandardSpaceDesignPoint(self)


    def setStandardSpaceDesignPoint(self, standardSpaceDesignPoint):
        """
        Accessor to the design point in the standard space.

        Parameters
        ----------
        designPoint : sequence of float
            Design point in the standard space resulting from the optimization
            algorithm.
        """
        return _analytical.AnalyticalResult_setStandardSpaceDesignPoint(self, standardSpaceDesignPoint)


    def getPhysicalSpaceDesignPoint(self):
        """
        Accessor to the design point in the physical space.

        Returns
        -------
        designPoint : :class:`~openturns.Point`
            Design point in the physical space resulting from the optimization
            algorithm.
        """
        return _analytical.AnalyticalResult_getPhysicalSpaceDesignPoint(self)


    def getLimitStateVariable(self):
        """
        Accessor to the event of which the probability is calculated.

        Returns
        -------
        limitStateVariable : :class:`~openturns.Event`
            Event of which the probability is calculated.
        """
        return _analytical.AnalyticalResult_getLimitStateVariable(self)


    def getIsStandardPointOriginInFailureSpace(self):
        """
        Accessor to know if the standard point origin is in the failure space.

        Returns
        -------
        isInFailureSpace : bool
            Indicates whether the origin of the standard space is in the failure space.
        """
        return _analytical.AnalyticalResult_getIsStandardPointOriginInFailureSpace(self)


    def setIsStandardPointOriginInFailureSpace(self, isStandardPointOriginInFailureSpace):
        """
        Accessor to specify if the standard point origin is in the failure space.

        Parameters
        ----------
        isInFailureSpace : bool
            Indicates whether the origin of the standard space is in the failure space.
        """
        return _analytical.AnalyticalResult_setIsStandardPointOriginInFailureSpace(self, isStandardPointOriginInFailureSpace)


    def getMeanPointInStandardEventDomain(self):
        """
        Accessor to the mean point in the standard event domain.

        Returns
        -------
        meanPoint : :class:`~openturns.Point`
            Mean point of the standard space distribution restricted to the event
            domain:
            :math:`\\displaystyle \\frac{1}{E_1(-\\beta)}\\int_{\\beta}^{\\infty} u_1 p_1(u_1)\\di{u_1}`
            where :math:`E_1` is the spheric univariate distribution of the standard
            space and :math:`\\beta` the reliability index.
        """
        return _analytical.AnalyticalResult_getMeanPointInStandardEventDomain(self)


    def setMeanPointInStandardEventDomain(self, meanPointInStandardEventDomain):
        """
        Accessor to the mean point in the standard event domain.

        Parameters
        ----------
        meanPoint : sequence of float
            Mean point of the standard space distribution restricted to the event
            domain:
            :math:`\\displaystyle \\frac{1}{E_1(-\\beta)}\\int_{\\beta}^{\\infty} u_1 p_1(u_1)\\di{u_1}`
            where :math:`E_1` is the spheric univariate distribution of the standard
            space and :math:`\\beta` the reliability index.
        """
        return _analytical.AnalyticalResult_setMeanPointInStandardEventDomain(self, meanPointInStandardEventDomain)


    def getImportanceFactors(self, *args):
        """
        Accessor to the importance factors.

        Parameters
        ----------
        type : int, optional
            - When *ot.AnalyticalResult.ELLIPTICAL*, the importance factors
              are evaluated as the square of the co-factors of the design point in the
              elliptical space of the iso-probabilistic transformation (Y-space).

            - When *ot.AnalyticalResult.CLASSICAL* they are evaluated as the square of
              the co-factors of the design point in the U-space.

            - When *ot.AnalyticalResult.PHYSICAL*, the importance factors are evaluated
              as the square of the physical sensitivities.

            By default *type = ot.AnalyticalResult.ELLIPTICAL*.

        Notes
        -----
        - If the importance factors are evaluated as the square of the
          co-factors of the design point in the U-space :

          .. math::

            \\alpha_i^2 = \\frac{(u_i^*)^2}
                              {\\beta_{HL}^2}

        - If the importance factors are evaluated as the square of the co-factors of the
          design point in the Y-space :

          .. math::

            \\alpha_i^2 = \\frac{(y_i^*)^2}
                              {\\|\\vect{y}^*\\|^2}

          where

          .. math::

            Y^* = \\left(
                  \\begin{array}{c}
                      E^{-1}\\circ F_1(X_1^*) \\\\
                      E^{-1}\\circ F_2(X_2^*) \\\\
                      \\vdots \\\\
                      E^{-1}\\circ F_n(X_n^*)
                  \\end{array}
                  \\right)

          with :math:`\\vect{X}^*` is the design point in the physical space and :math:`E`
          the univariate standard CDF of the elliptical space. In the case where the
          input distribution of :math:`\\vect{X}` has an elliptical copula
          :math:`C_E`, then :math:`E` has the same type as :math:`C_E`.
          In the case where the input distribution of :math:`\\vect{X}` has a copula
          :math:`C` which is not elliptical, then :math:`E=\\Phi` where :math:`\\Phi`
          is the CDF of the standard normal.

        - If the importance factors are evaluated as the square of the physical sensitivities :

          .. math::
              \\alpha_i^2 = \\displaystyle \\frac{s_i^2}{{\\|s\\|}^2}

          where

          .. math::
              s_i = \\displaystyle \\frac{\\partial \\beta}{\\partial x_i} (x^*)
                  = \\sum_{j=1}^n \\frac{\\partial \\beta}{\\partial u_i} \\frac{\\partial u_j}{\\partial x_i} (x^*)

        Returns
        -------
        factors : :class:`~openturns.PointWithDescription`
            Sequence containing the importance factors with a description for each
            component.
        """
        return _analytical.AnalyticalResult_getImportanceFactors(self, *args)


    def drawImportanceFactors(self, *args):
        """
        Draw the importance factors.

        Parameters
        ----------
        type : int, optional
            See :meth:`getImportanceFactors`

        Returns
        -------
        graph : :class:`~openturns.Graph`
            Pie of the importance factors of the probabilistic variables.
        """
        return _analytical.AnalyticalResult_drawImportanceFactors(self, *args)


    def getHasoferReliabilityIndex(self):
        """
        Accessor to the Hasofer Reliability Index.

        Returns
        -------
        index : float
            Hasofer Reliability Index which is the distance of the design point from
            the origin of the standard space :math:`\\beta_{HL}=||\\vect{u}^*||`.
        """
        return _analytical.AnalyticalResult_getHasoferReliabilityIndex(self)


    def getHasoferReliabilityIndexSensitivity(self):
        """
        Accessor to the sensitivities of the Hasofer Reliability Index.

        Returns
        -------
        sensitivity : :class:`~openturns.PointWithDescription`
            Sequence containing the sensitivities of the Hasofer Reliability Index to
            the parameters of the probabilistic input vector (marginals and dependence
            structure) with a description for each component.
        """
        return _analytical.AnalyticalResult_getHasoferReliabilityIndexSensitivity(self)


    def getOptimizationResult(self):
        """
        Accessor to the result of the optimization problem.

        Returns
        -------
        result : :class:`~openturns.OptimizationResult`
            Contains the design point in the standard space and information concerning
            the convergence of the optimization algorithm.
        """
        return _analytical.AnalyticalResult_getOptimizationResult(self)


    def setOptimizationResult(self, optimizationResult):
        """
        Accessor to the result of the optimization problem.

        Parameters
        ----------
        result : :class:`~openturns.OptimizationResult`
            Contains the design point in the standard space and information concerning
            the convergence of the optimization algorithm.
        """
        return _analytical.AnalyticalResult_setOptimizationResult(self, optimizationResult)


    def drawHasoferReliabilityIndexSensitivity(self, *args):
        """
        Draw the sensitivity of the Hasofer Reliability Index.

        Parameters
        ----------
        width : float, optional
            Value to calculate the shift position of the :class:`~openturns.BarPlot`.
            By default it is 1.0.

        Returns
        -------
        graphCollection : sequence of two :class:`~openturns.Graph` containing a barplot
            The first graph drawing the sensitivity of the Hasofer Reliability Index to
            the parameters of the marginals of the probabilistic input vector.
            The second graph drawing the sensitivity of the Hasofer Reliability Index
            to the parameters of the dependence structure of the probabilistic input
            vector.
        """
        return _analytical.AnalyticalResult_drawHasoferReliabilityIndexSensitivity(self, *args)


    def __repr__(self):
        return _analytical.AnalyticalResult___repr__(self)

    def __init__(self, *args):
        this = _analytical.new_AnalyticalResult(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _analytical.delete_AnalyticalResult
    __del__ = lambda self: None
AnalyticalResult_swigregister = _analytical.AnalyticalResult_swigregister
AnalyticalResult_swigregister(AnalyticalResult)

class Analytical(openturns.common.PersistentObject):
    """
    Base class to evaluate the probability of failure of a system.

    Available constructors:
        Analytical(*nearestPointAlgorithm, event, physicalStartingPoint*)

    Parameters
    ----------
    nearestPointAlgorithm : :class:`~openturns.OptimizationAlgorithm`
        Optimization algorithm used to research the design point.
    event : :class:`~openturns.Event`
        Failure event.
    physicalStartingPoint : sequence of float
        Starting point of the optimization algorithm, declared in the physical
        space.

    Notes
    -----
    Used in reliability analysis, Analytical is a base class for the approximation
    methods :class:`~openturns.FORM` and :class:`~openturns.SORM` enabling to
    evaluate the failure probability of a system.
    A failure event is defined as follows :
    :math:`\\cD_f = \\{\\vect{X} \\in \\Rset^n \\, | \\, g(\\vect{X},\\vect{d}) \\le 0\\}`
    where :math:`\\vect{X}` denotes a random input vector representing the sources
    of uncertainties, :math:`\\vect{d}` is a determinist vector representing the
    fixed variables. :math:`g(\\vect{X},\\vect{d})` is the limit state function of
    the model separating the failure domain from the safe domain.
    Considering :math:`f_\\vect{X}(\\vect{x})` the joint probability density function
    of the random variables :math:`\\vect{X}`, the probability of failure of the
    event :math:`\\cD_f` is :

    .. math::

        P_f = \\int_{g(\\vect{X},\\vect{d})\\le 0}f_\\vect{X}(\\vect{x})\\di{\\vect{x}}

    The analytical methods use an isoprobabilistic transformation to move from
    the physical space to the standard normal space (U-space) where distributions
    are spherical (invariant by rotation by definition), with zero mean, unit
    variance and unit correlation matrix. The usual isoprobabilistic
    transformations are the Generalized Nataf transformation and the Rosenblatt one.

    In that new U-space, the event has the new expression defined
    from the transformed limit state function of the model
    :math:`G : \\cD_f = \\{\\vect{U} \\in \\Rset^n \\, | \\, G(\\vect{U}\\,,\\,\\vect{d}) \\le 0\\}`
    and its boundary :
    :math:`\\{\\vect{U} \\in \\Rset^n \\, | \\,G(\\vect{U}\\,,\\,\\vect{d}) = 0\\}`.
    Then, the event probability :math:`P_f` rewrites :

    .. math::

        P_f = \\Prob{G(\\vect{U}\\,,\\,\\vect{d})\\leq 0}
            = \\int_{\\Rset^n} \\boldsymbol{1}_{G(\\vect{u}\\,,\\,\\vect{d}) \\leq 0}\\,f_{\\vect{U}}(\\vect{u})\\di{\\vect{u}}

    where :math:`f_{\\vect{U}}` is the density function of the distribution in the
    standard space.

    The analytical methods rely on the assumption that most of the contribution
    to :math:`P_f` comes from points located in the vicinity of a particular point
    :math:`P^*`, the **design point**, defined in the U-space as the point located
    on the limit state surface verifying the event of maximum likelihood. Given the
    probabilistic characteristics of the U-space, :math:`P^*` has a geometrical
    interpretation: it is the point located on the event boundary and at minimal
    distance from the origin of the U-space. Thus, considering :math:`\\vect{u}^*`
    its coordinates in the U-space, the design point is the result of the
    constrained optimization problem :

    .. math::

        \\vect{u}^* = argmin \\{||\\vect{u}|| \\, | \\, G(\\vect{u}) = 0 \\}

    Then the limit state surface is approximated in the standard space by a linear
    surface (:class:`~openturns.FORM`) or by a quadratic surface
    (:class:`~openturns.SORM`) at the design point in order to evaluate the
    failure probability. For more information on this evaluation, see the
    documentation associated with these two methods.

    The result of the optimization problem is recoverable thanks to the method
    :meth:`getAnalyticalResult`.

    The unicity and the strongness of the design point can be checked thanks to the
    :class:`Strong Maximum Test <openturns.StrongMaximumTest>`.

    See also
    --------
    FORM, SORM, StrongMaximumTest, Event, StandardEvent, AnalyticalResult

    Examples
    --------
    >>> import openturns as ot
    >>> myFunction = ot.SymbolicFunction(['E', 'F', 'L', 'I'], ['-F*L^3/(3*E*I)'])
    >>> myDistribution = ot.Normal([50.0, 1.0, 10.0, 5.0], [1.0]*4, ot.IdentityMatrix(4))
    >>> vect = ot.RandomVector(myDistribution)
    >>> output = ot.RandomVector(myFunction, vect)
    >>> myEvent = ot.Event(output, ot.Less(), -3.0)
    >>> # We create an OptimizationAlgorithm algorithm
    >>> myOptim = ot.AbdoRackwitz()
    >>> myAlgo = ot.Analytical(myOptim, myEvent, [50.0, 1.0, 10.0, 5.0])
    """

    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Analytical, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Analytical, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _analytical.Analytical_getClassName(self)


    def getPhysicalStartingPoint(self):
        """
        Accessor to the starting point of the optimization algorithm.

        Returns
        -------
        point : :class:`~openturns.Point`
            Starting point of the optimization algorithm, declared in the physical
            space.
        """
        return _analytical.Analytical_getPhysicalStartingPoint(self)


    def setPhysicalStartingPoint(self, physicalStartingPoint):
        """
        Accessor to the starting point of the optimization algorithm.

        Parameters
        ----------
        point : sequence of float
            Starting point of the optimization algorithm, declared in the physical
            space.
        """
        return _analytical.Analytical_setPhysicalStartingPoint(self, physicalStartingPoint)


    def getEvent(self):
        """
        Accessor to the event of which the probability is calculated.

        Returns
        -------
        event : :class:`~openturns.Event`
            Event of which the probability is calculated.
        """
        return _analytical.Analytical_getEvent(self)


    def setEvent(self, event):
        """
        Accessor to the event of which the probability is calculated.

        Parameters
        ----------
        event : :class:`~openturns.Event`
            Event of which the probability is calculated.
        """
        return _analytical.Analytical_setEvent(self, event)


    def getNearestPointAlgorithm(self):
        """
        Accessor to the optimization algorithm used to find the design point.

        Returns
        -------
        algorithm : :class:`~openturns.OptimizationAlgorithm`
             Optimization algorithm used to research the design point.
        """
        return _analytical.Analytical_getNearestPointAlgorithm(self)


    def setNearestPointAlgorithm(self, solver):
        """
        Accessor to the optimization algorithm used to find the design point.

        Parameters
        ----------
        algorithm : :class:`~openturns.OptimizationAlgorithm`
             Optimization algorithm used to research the design point.
        """
        return _analytical.Analytical_setNearestPointAlgorithm(self, solver)


    def getAnalyticalResult(self):
        """
        Accessor to the result.

        Returns
        -------
        result : :class:`~openturns.AnalyticalResult`
            Result structure which contains the results of the optimisation problem.
        """
        return _analytical.Analytical_getAnalyticalResult(self)


    def __repr__(self):
        return _analytical.Analytical___repr__(self)

    def run(self):
        """
        Perform the research of the design point.

        Notes
        -----
        Performs the research of the design point and creates a
        :class:`~openturns.AnalyticalResult`, the structure result which is
        accessible with the method :meth:`getAnalyticalResult`.
        """
        return _analytical.Analytical_run(self)


    def __init__(self, *args):
        this = _analytical.new_Analytical(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _analytical.delete_Analytical
    __del__ = lambda self: None
Analytical_swigregister = _analytical.Analytical_swigregister
Analytical_swigregister(Analytical)

class FORMResult(AnalyticalResult):
    """
    Result of a FORM analysis.

    Available constructors:
        FORMResult(*designPoint, limitStateVariable, isInFailureSpace*)

    Notes
    -----
    Structure created by the method run() of the :class:`~openturns.FORM`
    class and obtained thanks to its method getResult().

    Parameters
    ----------
    designPoint : sequence of float
        Design point in the standard space resulting from the optimization
        algorithm.
    limitStateVariable : :class:`~openturns.Event`
        Event of which the probability is calculated.
    isInFailureSpace : bool
        Indicates whether the origin of the standard space is in the failure space.


    See also
    --------
    Analytical, AnalyticalResult, SORM, SORMResult, FORM, StrongMaximumTest
    """

    __swig_setmethods__ = {}
    for _s in [AnalyticalResult]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, FORMResult, name, value)
    __swig_getmethods__ = {}
    for _s in [AnalyticalResult]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, FORMResult, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _analytical.FORMResult_getClassName(self)


    def getEventProbability(self):
        """
        Accessor to the failure probability :math:`P_f`.

        Returns
        -------
        probability : positive float
            The FORM failure probability :math:`P_f`.
        """
        return _analytical.FORMResult_getEventProbability(self)


    def getGeneralisedReliabilityIndex(self):
        """
        Accessor to the Generalised Reliability Index.

        Returns
        -------
        index : float
            Generalised reliability index :math:`\\beta_g` from the FORM failure
            probability is equal to :math:`\\pm` the Hasofer reliability index
            :math:`\\beta_{HL}` according to the fact the standard space center
            fulfills the event or not.
        """
        return _analytical.FORMResult_getGeneralisedReliabilityIndex(self)


    def getEventProbabilitySensitivity(self):
        """
        Accessor to the sentivities of the FORM failure probability :math:`P_f`.

        Returns
        -------
        sentivities : :class:`~openturns.Point`
            Sentivities of the FORM failure probability with regards to the parameters
            of the probabilistic input vector and to parameters of the dependence
            structure of the probabilistic input vector.
        """
        return _analytical.FORMResult_getEventProbabilitySensitivity(self)


    def drawEventProbabilitySensitivity(self, *args):
        """
        Draw the sensitivities of the FORM failure probability.

        Parameters
        ----------
        width : float, optional
            Value to calculate the shift position of the :class:`~openturns.BarPlot`.
            By default it is 1.0.

        Returns
        -------
        graphCollection : list of two :class:`~openturns.Graph` containing a barplot
            The first graph drawing the sensitivities of the FORM failure probability
            with regards to the parameters of the probabilistic input vector.
            The second graph drawing the sensitivities of the FORM failure probability
            with regards to the parameters of the dependence structure of the
            probabilistic input vector.
        """
        return _analytical.FORMResult_drawEventProbabilitySensitivity(self, *args)


    def __repr__(self):
        return _analytical.FORMResult___repr__(self)

    def __init__(self, *args):
        this = _analytical.new_FORMResult(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _analytical.delete_FORMResult
    __del__ = lambda self: None
FORMResult_swigregister = _analytical.FORMResult_swigregister
FORMResult_swigregister(FORMResult)

class FORM(Analytical):
    """
    First Order Reliability Method (FORM).

    Available constructors:
        FORM(*nearestPointAlgorithm, event, physicalStartingPoint*)

    Parameters
    ----------
    nearestPointAlgorithm : :class:`~openturns.OptimizationAlgorithm`
        Optimization algorithm used to research the design point.
    event : :class:`~openturns.Event`
        Failure event.
    physicalStartingPoint : sequence of float
        Starting point of the optimization algorithm, declared in the physical
        space.

    Notes
    -----
    See :class:`~openturns.Analytical` for the description of the first steps of
    the FORM analysis.

    The First Order Reliability Method (FORM) consists in linearizing the limit state
    function :math:`G(\\vect{U}\\,,\\,\\vect{d})` at the design point, denoted
    :math:`P^*`, which is the point on the limit state surface
    :math:`G(\\vect{U}\\,,\\,\\vect{d})=0` that is closest to the origin of the
    standard space.

    Then, the probability :math:`P_f` where the limit state surface has been
    approximated by a linear surface (hyperplane) can be obtained exactly, thanks
    to the rotation invariance of the standard distribution :math:`f_{\\vect{U}}` :

    .. math::

        P_f = \\left\\{
                  \\begin{array}{ll}
                  \\displaystyle E(-\\beta_{HL})
                  & \\text{if the origin of the }\\vect{u}\\text{-space lies in the domain }\\cD_f \\\\
                  \\displaystyle E(+\\beta_{HL}) & \\text{otherwise}
                  \\end{array}
              \\right.

    where :math:`\\beta_{HL}` is the Hasofer-Lind reliability index, defined as the
    distance of the design point :math:`\\vect{u}^*` to the origin of the standard
    space and :math:`E` the marginal cumulative density function of the spherical
    distributions in the standard space.

    The evaluation of the failure probability is stored in the data structure
    :class:`~openturns.FORMResult` recoverable with the :meth:`getResult` method.

    See also
    --------
    Analytical, AnalyticalResult, SORM, StrongMaximumTest, FORMResult

    Examples
    --------
    >>> import openturns as ot
    >>> myFunction = ot.SymbolicFunction(['E', 'F', 'L', 'I'], ['-F*L^3/(3*E*I)'])
    >>> myDistribution = ot.Normal([50.0, 1.0, 10.0, 5.0], [1.0]*4, ot.IdentityMatrix(4))
    >>> vect = ot.RandomVector(myDistribution)
    >>> output = ot.RandomVector(myFunction, vect)
    >>> event = ot.Event(output, ot.Less(), -3.0)
    >>> # We create an OptimizationAlgorithm algorithm
    >>> solver = ot.AbdoRackwitz()
    >>> algo = ot.FORM(solver, event, [50.0, 1.0, 10.0, 5.0])
    >>> algo.run()
    >>> result = algo.getResult()
    """

    __swig_setmethods__ = {}
    for _s in [Analytical]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, FORM, name, value)
    __swig_getmethods__ = {}
    for _s in [Analytical]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, FORM, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _analytical.FORM_getClassName(self)


    def getResult(self):
        """
        Accessor to the result of FORM.

        Returns
        -------
        result : :class:`~openturns.FORMResult`
            Structure containing all the results of the FORM analysis.
        """
        return _analytical.FORM_getResult(self)


    def setResult(self, formResult):
        """
        Accessor to the result of FORM.

        Parameters
        ----------
        result : :class:`~openturns.FORMResult`
            Structure containing all the results of the FORM analysis.
        """
        return _analytical.FORM_setResult(self, formResult)


    def __repr__(self):
        return _analytical.FORM___repr__(self)

    def run(self):
        """
        Evaluate the failure probability.

        Notes
        -----
        Evaluate the failure probability and create a :class:`~openturns.FORMResult`,
        the structure result which is accessible with the method :meth:`getResult`.
        """
        return _analytical.FORM_run(self)


    def __init__(self, *args):
        this = _analytical.new_FORM(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _analytical.delete_FORM
    __del__ = lambda self: None
FORM_swigregister = _analytical.FORM_swigregister
FORM_swigregister(FORM)

class SORMResult(AnalyticalResult):
    """
    Result of a SORM analysis.

    Available constructors:
        SORMResult(*designPoint, limitStateVariable, isInFailureSpace*)

    Notes
    -----
    Structure created by the method run() of the :class:`~openturns.SORM`
    class and obtained thanks to its method getResult().

    Parameters
    ----------
    designPoint : sequence of float
        Design point in the standard space resulting from the optimization
        algorithm.
    limitStateVariable : :class:`~openturns.Event`
        Event of which the probability is calculated.
    isInFailureSpace : bool
        Indicates whether the origin of the standard space is in the failure space.


    See also
    --------
    Analytical, AnalyticalResult, FORM, FORMResult, StrongMaximumTest
    """

    __swig_setmethods__ = {}
    for _s in [AnalyticalResult]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SORMResult, name, value)
    __swig_getmethods__ = {}
    for _s in [AnalyticalResult]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SORMResult, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _analytical.SORMResult_getClassName(self)


    def getEventProbabilityBreitung(self):
        """
        Accessor to the failure probability :math:`P_{Breitung}`.

        Returns
        -------
        probability : positive float
            The SORM failure probability :math:`P_{Breitung}` according to the
            :ref:`Breitung <Breitung_formula>` approximation.
        """
        return _analytical.SORMResult_getEventProbabilityBreitung(self)


    def getEventProbabilityHohenBichler(self):
        """
        Accessor to the failure probability :math:`P_{Hohenbichler}`.

        Returns
        -------
        probability : positive float
            The SORM failure probability :math:`P_{Hohenbichler}` according to the
            :ref:`Hohen Bichler <Hohenbichler_formula>` approximation.
        """
        return _analytical.SORMResult_getEventProbabilityHohenBichler(self)


    def getEventProbabilityTvedt(self):
        """
        Accessor to the failure probability :math:`P_{Tvedt}`.

        Returns
        -------
        probability : positive float
            The SORM failure probability :math:`P_{Tvedt}` according to the
            :ref:`Tvedt <Tvedt_formula>` approximation.
        """
        return _analytical.SORMResult_getEventProbabilityTvedt(self)


    def getGeneralisedReliabilityIndexBreitung(self):
        """
        Accessor to the Generalised Reliability Index Breitung.

        Returns
        -------
        index : float
            Generalised reliability index evaluated from the Breitung SORM failure
            probability.

            .. math::

                \\beta_{Breitung} = \\left \\{
                \\begin{array}{ll}
                \\displaystyle -\\Phi(P_{Breitung})
                & \\text{if the standard space origin is not in the failure space} \\\\
                \\displaystyle \\Phi(P_{Breitung}) & \\text{otherwise}
                \\end{array}
                \\right.
        """
        return _analytical.SORMResult_getGeneralisedReliabilityIndexBreitung(self)


    def getGeneralisedReliabilityIndexHohenBichler(self):
        """
        Accessor to the Generalised Reliability Index HohenBichler.

        Returns
        -------
        index : float
            Generalised reliability index evaluated from the Hohen Bichler SORM failure
            probability.

            .. math::

                \\beta_{Hohenbichler} = \\left \\{
                \\begin{array}{ll}
                \\displaystyle -\\Phi(P_{Hohenbichler})
                & \\text{if the standard space origin is not in the failure space} \\\\
                \\displaystyle \\Phi(P_{Hohenbichler}) & \\text{otherwise}
                \\end{array}
                \\right.
        """
        return _analytical.SORMResult_getGeneralisedReliabilityIndexHohenBichler(self)


    def getGeneralisedReliabilityIndexTvedt(self):
        """
        Accessor to the Generalised Reliability Index Tvedt.

        Returns
        -------
        index : float
            Generalised reliability index evaluated from the Tvedt SORM failure
            probability.

            .. math::

                \\beta_{Tvedt} = \\left \\{
                \\begin{array}{ll}
                \\displaystyle -\\Phi(P_{Tvedt})
                & \\text{if the standard space origin is not in the failure space} \\\\
                \\displaystyle \\Phi(P_{Tvedt}) & \\text{otherwise}
                \\end{array}
                \\right.
        """
        return _analytical.SORMResult_getGeneralisedReliabilityIndexTvedt(self)


    def getSortedCurvatures(self):
        """
        Accessor to the sorted curvatures.

        Returns
        -------
        curvatures : :class:`~openturns.Point`
            Curvatures of the standard limite state function at the standard design
            point :math:`(\\kappa_i)_{1 \\leq i \\leq n-1}` with :math:`n` the dimension
            of the random vector :math:`\\vect{X}`.
        """
        return _analytical.SORMResult_getSortedCurvatures(self)


    def __repr__(self):
        return _analytical.SORMResult___repr__(self)

    def __str__(self, *args):
        return _analytical.SORMResult___str__(self, *args)

    def __init__(self, *args):
        this = _analytical.new_SORMResult(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _analytical.delete_SORMResult
    __del__ = lambda self: None
SORMResult_swigregister = _analytical.SORMResult_swigregister
SORMResult_swigregister(SORMResult)

class SORM(Analytical):
    """
    Second Order Reliability Method (SORM).

    Available constructors:
        SORM(*nearestPointAlgorithm, event, physicalStartingPoint*)

    Parameters
    ----------
    nearestPointAlgorithm : :class:`~openturns.OptimizationAlgorithm`
        Optimization algorithm used to research the design point.
    event : :class:`~openturns.Event`
        Failure event.
    physicalStartingPoint : sequence of float
        Starting point of the optimization algorithm, declared in the physical
        space.

    Notes
    -----
    See :class:`~openturns.Analytical` for the description of the first steps of
    the SORM analysis.

    The Second Order Reliability Method (SORM) consists in approximating the limit
    state surface in U-space at the design point :math:`P^*` by a quadratic
    surface. SORM is usually more accurate than FORM e.g. in case when the event
    boundary is highly curved.

    Let us denote by :math:`n` the dimension of the random vector :math:`\\vect{X}`
    and :math:`(\\kappa_i)_{1 \\leq i \\leq n-1}` the :math:`n-1` main curvatures of
    the limit state function at the design point in the standard space.

    Several approximations of the failure probability :math:`P_f` are available in
    the standard version of OpenTURNS, detailed here in the case where the origin
    of the standard space does not belong to the failure domain :

    - Breitung's formula :

      .. _Breitung_formula:

      .. math ::

          P_{Breitung} = E(-\\beta_{HL})\\prod_{i=1}^{n-1} \\frac{1}{\\sqrt{1 + \\beta_{HL}\\kappa_i}}

      :math:`E` the marginal cumulative density function of the spherical
      distributions in the standard space and :math:`\\beta_{HL}` is the Hasofer-Lind
      reliability index, defined as the distance of the design point
      :math:`\\vect{u}^*` to the origin of the standard space.

    - Hohen Bichler's formula is an approximation of the previous equation :

      .. _Hohenbichler_formula:

      .. math ::

          \\displaystyle P_{Hohenbichler} = \\Phi(-\\beta_{HL})
           \\prod_{i=1}^{n-1} \\left(
                             1 + \\frac{\\phi(\\beta_{HL})}{\\Phi(-\\beta_{HL})}\\kappa_i
                             \\right) ^{-1/2}

      where :math:`\\Phi` is the cumulative distribution function of the
      standard 1D normal distribution and :math:`\\phi` is the standard Gaussian
      probability density function.

    - Tvedt's formula :

      .. _Tvedt_formula:

      .. math ::

          \\left\\{
            \\begin{array}{lcl}
              \\displaystyle P_{Tvedt} & = & A_1 + A_2 + A_3 \\\\
              \\displaystyle A_1 & = & \\displaystyle
                \\Phi(-\\beta_{HL}) \\prod_{i=1}^{N-1} \\left( 1 + \\beta_{HL} \\kappa_i \\right) ^{-1/2}\\\\
              \\displaystyle A_2 & = & \\displaystyle
                \\left[ \\beta_{HL} \\Phi(-\\beta_{HL}) - \\phi(\\beta_{HL}) \\right]
                \\left[ \\prod_{j=1}^{N-1} \\left( 1 + \\beta_{HL} \\kappa_i \\right) ^{-1/2} -
                       \\prod_{j=1}^{N-1} \\left( 1 + (1 + \\beta_{HL}) \\kappa_i \\right) ^{-1/2}
                \\right ] \\\\
              \\displaystyle A_3 & = & \\displaystyle (1 + \\beta_{HL})
                \\left[ \\beta_{HL} \\Phi(-\\beta_{HL}) - \\phi(\\beta_{HL}) \\right]
                \\left[ \\prod_{j=1}^{N-1} \\left( 1 + \\beta_{HL} \\kappa_i \\right) ^{-1/2} -
                       {\\cR}e \\left( \\prod_{j=1}^{N-1} \\left( 1 + (i + \\beta_{HL}) \\kappa_j \\right) ^{-1/2}
                \\right)\\right ]
            \\end{array}
          \\right.

      where :math:`{\\cR}e(z)` is the real part of the complex number :math:`z` and
      :math:`i` the complex number such that :math:`i^2 = -1`.

    The evaluation of the failure probability is stored in the data structure
    :class:`~openturns.SORMResult` recoverable with the :meth:`getResult` method.

    See also
    --------
    Analytical, AnalyticalResult, FORM, StrongMaximumTest, SORMResult

    Examples
    --------
    >>> import openturns as ot
    >>> myFunction = ot.SymbolicFunction(['E', 'F', 'L', 'I'], ['-F*L^3/(3*E*I)'])
    >>> myDistribution = ot.Normal([50.0, 1.0, 10.0, 5.0], [1.0]*4, ot.IdentityMatrix(4))
    >>> vect = ot.RandomVector(myDistribution)
    >>> output = ot.RandomVector(myFunction, vect)
    >>> event = ot.Event(output, ot.Less(), -3.0)
    >>> # We create an OptimizationAlgorithm algorithm
    >>> solver = ot.AbdoRackwitz()
    >>> algo = ot.SORM(solver, event, [50.0, 1.0, 10.0, 5.0])
    >>> algo.run()
    >>> result = algo.getResult()
    """

    __swig_setmethods__ = {}
    for _s in [Analytical]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SORM, name, value)
    __swig_getmethods__ = {}
    for _s in [Analytical]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SORM, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _analytical.SORM_getClassName(self)


    def getResult(self):
        """
        Accessor to the result of SORM.

        Returns
        -------
        result : :class:`~openturns.SORMResult`
            Structure containing all the results of the SORM analysis.
        """
        return _analytical.SORM_getResult(self)


    def setResult(self, sormResult):
        """
        Accessor to the result of SORM.

        Parameters
        ----------
        result : :class:`~openturns.SORMResult`
            Structure containing all the results of the SORM analysis.
        """
        return _analytical.SORM_setResult(self, sormResult)


    def __repr__(self):
        return _analytical.SORM___repr__(self)

    def run(self):
        """
        Evaluate the failure probability.

        Notes
        -----
        Evaluate the failure probability and create a :class:`~openturns.SORMResult`,
        the structure result which is accessible with the method :meth:`getResult`.
        """
        return _analytical.SORM_run(self)


    def __init__(self, *args):
        this = _analytical.new_SORM(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _analytical.delete_SORM
    __del__ = lambda self: None
SORM_swigregister = _analytical.SORM_swigregister
SORM_swigregister(SORM)

class StrongMaximumTest(openturns.common.PersistentObject):
    """
    Strong Maximum Test.

    Available constructors:
        StrongMaximumTest(*event, designPoint, importanceLevel, accuracyLevel, confidenceLevel*)

        StrongMaximumTest(*event, designPoint, importanceLevel, accuracyLevel, pointNumber*)

    Parameters
    ----------
    event : :class:`~openturns.StandardEvent`
        Failure event :math:`\\cD_f` defining in the standard space (U-space).
    designPoint : sequence of float
        Design point in the standard space resulting from the optimization
        algorithm.
    importanceLevel : float, :math:`0 < \\varepsilon < 1`
        Importance level.
    accuracyLevel : float, :math:`\\tau > 0`
        Accuracy level. It is recommanded to take :math:`\\tau \\leq 4`.
    confidenceLevel : positive float, :math:`0 < (1-q) < 1`
        Confidence level.
    pointNumber : int, :math:`N > 0`
        Number of points used to perform the Strong Maximum Test, evaluated by the
        limit state function.

    Notes
    -----
    The Strong Maximum Test helps to evaluate the quality of the design point
    :math:`P^*` resulting from the optimization algorithm launched for example by
    the :class:`~openturns.Analytical` class or its derived classes
    :class:`~openturns.FORM` and :class:`~openturns.SORM`.
    It checks whether the design point computed is :

    - the *true* design point, which means a global maximum point,

    - a *strong* design point, which means that there is no other local maximum
      located on the event boundary and which likelihood is slightly inferior to
      the design point one.

    The Strong Maximum Test will sample the sphere centered on the origin of the
    standard space and of radius :
    :math:`R = \\beta_{HL} (1 + \\tau \\delta_{\\varepsilon})` with :math:`\\tau > 0`,
    :math:`\\delta_{\\varepsilon}=\\sqrt{1 - 2 \\frac{ln(\\varepsilon)}{\\beta_{HL}^2}} - 1`
    and :math:`\\beta_{HL}` the Hasofer-Lind reliability index.

    The number :math:`N` of the simulations sampling the sphere of radius :math:`R`
    is determined to ensure that the test detects with a probability greater than
    :math:`(1-q)` any point of :math:`\\cD_f` outside the design point vicinity
    which contribution to :math:`P_f` is not negligeable (i.e. which density value
    in the U-space is greater than :math:`\\varepsilon` times the density value at
    the design point).

    See also
    --------
    Analytical, SORM, FORM, SORMResult, FORMResult

    Examples
    --------
    >>> import openturns as ot
    >>> myFunction = ot.SymbolicFunction(['E', 'F', 'L', 'I'], ['-F*L^3/(3*E*I)'])
    >>> myDistribution = ot.Normal([50.0, 1.0, 10.0, 5.0], [1.0]*4, ot.IdentityMatrix(4))
    >>> vect = ot.RandomVector(myDistribution)
    >>> output = ot.RandomVector(myFunction, vect)
    >>> myEvent = ot.Event(output, ot.Less(), -3.0)
    >>> # FORM analyse to get the design point
    >>> myAlgo = ot.FORM(ot.AbdoRackwitz(), myEvent, [50.0, 1.0, 10.0, 5.0])
    >>> myAlgo.run()
    >>> FORMresult = myAlgo.getResult()
    >>> designPoint = FORMresult.getStandardSpaceDesignPoint()
    >>> # Strong Max Test
    >>> myStandardEvent = ot.StandardEvent(myEvent)
    >>> myTest = ot.StrongMaximumTest(myStandardEvent, designPoint, 0.15, 3, 0.99)
    >>> myTest.run()
    """

    __swig_setmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, StrongMaximumTest, name, value)
    __swig_getmethods__ = {}
    for _s in [openturns.common.PersistentObject]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, StrongMaximumTest, name)

    def getClassName(self):
        """
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _analytical.StrongMaximumTest_getClassName(self)


    def getStandardSpaceDesignPoint(self):
        """
        Accessor to the design point in the standard space.

        Returns
        -------
        point : :class:`~openturns.Point`
            Design point in the standard space.
        """
        return _analytical.StrongMaximumTest_getStandardSpaceDesignPoint(self)


    def getEvent(self):
        """
        Accessor to the event in the standard space.

        Returns
        -------
        event : :class:`~openturns.StandardEvent`
            Failure event :math:`\\cD_f` in the standard space on which is based the
            Strong Maximum Test.
        """
        return _analytical.StrongMaximumTest_getEvent(self)


    def getImportanceLevel(self):
        """
        Accessor to the importance level.

        Returns
        -------
        level : float
            Importance level :math:`\\varepsilon`.
        """
        return _analytical.StrongMaximumTest_getImportanceLevel(self)


    def getAccuracyLevel(self):
        """
        Accessor to the accuracy level.

        Returns
        -------
        accuracy : positive float
            Accuracy level :math:`\\tau`.
        """
        return _analytical.StrongMaximumTest_getAccuracyLevel(self)


    def getConfidenceLevel(self):
        """
        Accessor to the confidence level.

        Returns
        -------
        level : positive float
            Confidence level :math:`(1-q)`.
        """
        return _analytical.StrongMaximumTest_getConfidenceLevel(self)


    def getDesignPointVicinity(self):
        """
        Accessor to the design point vinicity.

        Returns
        -------
        vicinity : float, :math:`v > 0`
            Design point vinicity :math:`v = \\frac{1} {1 + \\tau \\delta_{\\varepsilon}}`.
        """
        return _analytical.StrongMaximumTest_getDesignPointVicinity(self)


    def getPointNumber(self):
        """
        Accessor to the number of points.

        Returns
        -------
        number : int, :math:`N > 0`
            Number of points used to perform the Strong Maximum Test, evaluated by the
            limit state function.
        """
        return _analytical.StrongMaximumTest_getPointNumber(self)


    def getDeltaEpsilon(self):
        """
        Accessor to the parameter :math:`\\delta_{\\varepsilon}`.

        Returns
        -------
        delta_epsilon : float
            :math:`\\delta_{\\varepsilon} = \\sqrt{1 - 2 \\frac{ln(\\varepsilon)}{\\beta^2}} - 1`.
        """
        return _analytical.StrongMaximumTest_getDeltaEpsilon(self)


    def run(self):
        """Perform the Strong Maximum Test."""
        return _analytical.StrongMaximumTest_run(self)


    def getNearDesignPointVerifyingEventPoints(self):
        """
        Accessor to the points verifying the event and near of the design point.

        Returns
        -------
        points : :class:`~openturns.Sample`
            The points of the discretized sphere which are inside the vicinity of
            the standard design point and which verify the event.
        """
        return _analytical.StrongMaximumTest_getNearDesignPointVerifyingEventPoints(self)


    def getFarDesignPointVerifyingEventPoints(self):
        """
        Accessor to the points verifying the event and far of the design point.

        Returns
        -------
        points : :class:`~openturns.Sample`
            The points of the discretized sphere which are out of the vicinity of
            the standard design point and which verify the event.
        """
        return _analytical.StrongMaximumTest_getFarDesignPointVerifyingEventPoints(self)


    def getNearDesignPointViolatingEventPoints(self):
        """
        Accessor to the points not verifying the event and near of the design point.

        Returns
        -------
        point : :class:`~openturns.Sample`
            The points of the discretized sphere which are out of the vicinity of
            the standard design point and which don't verify the event.
        """
        return _analytical.StrongMaximumTest_getNearDesignPointViolatingEventPoints(self)


    def getFarDesignPointViolatingEventPoints(self):
        """
        Accessor to the points not verifying the event and far of the design point.

        Returns
        -------
        points : :class:`~openturns.Sample`
            The points of the discretized sphere which are out of the vicinity of
            the standard design point and which don't verify the event.
        """
        return _analytical.StrongMaximumTest_getFarDesignPointViolatingEventPoints(self)


    def getNearDesignPointVerifyingEventValues(self):
        """
        Accessor to values of the limit state function.

        Returns
        -------
        values : :class:`~openturns.Sample`
            The values of the limit state function on the points of the
            discretized sphere which are inside the vicinity of the standard design
            point and which verify the event.
        """
        return _analytical.StrongMaximumTest_getNearDesignPointVerifyingEventValues(self)


    def getFarDesignPointVerifyingEventValues(self):
        """
        Accessor to values of the limit state function.

        Returns
        -------
        values : :class:`~openturns.Sample`
            The values of the limit state function on the points of the
            discretized sphere which are out of the vicinity of the standard design
            point and which verify the event.
        """
        return _analytical.StrongMaximumTest_getFarDesignPointVerifyingEventValues(self)


    def getNearDesignPointViolatingEventValues(self):
        """
        Accessor to values of the limit state function.

        Returns
        -------
        values : :class:`~openturns.Sample`
            The values of the limit state function on the points of the
            discretized sphere which are inside the vicinity of the standard design
            point and which don't verify the event.
        """
        return _analytical.StrongMaximumTest_getNearDesignPointViolatingEventValues(self)


    def getFarDesignPointViolatingEventValues(self):
        """
        Accessor to values of the limit state function.

        Returns
        -------
        values : :class:`~openturns.Sample`
            The values of the limit state function on the points of the
            discretized sphere which are out of the vicinity of the standard design
            point and which don't verify the event.
        """
        return _analytical.StrongMaximumTest_getFarDesignPointViolatingEventValues(self)


    def __repr__(self):
        return _analytical.StrongMaximumTest___repr__(self)

    def __init__(self, *args):
        this = _analytical.new_StrongMaximumTest(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _analytical.delete_StrongMaximumTest
    __del__ = lambda self: None
StrongMaximumTest_swigregister = _analytical.StrongMaximumTest_swigregister
StrongMaximumTest_swigregister(StrongMaximumTest)

# This file is compatible with both classic and new-style classes.