Changeset 980

Show
Ignore:
Timestamp:
10/22/08 08:25:27 (3 months ago)
Author:
lebrun
Message:

MERGE: trunk> svn merge -r 967:979 https://.../trunk

Synchronization with trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/chaos/doc/src/UseCasesGuide/OpenTURNS_UseCasesGuide.tex

    r883 r980  
    10331033   # Create the correlation matrix R of the  normal copula  
    10341034   # from the Spearman correlation matrix S 
    1035    R = NormalCopula.getNormalCorrelationFromSpearmanCorrelation(S) 
     1035   R = NormalCopula.GetNormalCorrelationFromSpearmanCorrelation(S) 
    10361036     
    10371037   # Create the normal copula from the R correlation matrix 
     
    14761476  # CARE : if the dimension is >1 
    14771477  # For example, with dimension 2, at pointVector=(2.3, 4.5) 
    1478   pointVector = NumeriaclPoint(2) 
     1478  pointVector = NumericalPoint(2) 
    14791479  pointVector[0] = 2.3 
    14801480  pointVector[1] = 4.5 
     
    21142114 
    21152115    # Get the p-value of the Smirnov Test 
    2116     print "p-value of the Smirnov Test = ", resultSmirnov.getPvalue() 
     2116    print "p-value of the Smirnov Test = ", resultSmirnov.getPValue() 
    21172117 
    21182118    # Get the p-value threshold of the  Test 
     
    21872187 
    21882188    # Get the p-value of the  Test 
    2189     print "p-value of the  Test = ", resultChiSquared.getPvalue() 
     2189    print "p-value of the  Test = ", resultChiSquared.getPValue() 
    21902190 
    21912191    # Get the p-value threshold of the ChiSquared Test 
     
    22042204 
    22052205    # Get the p-value of the Pearson Test 
    2206     print "p-value of the Pearson Test = ", resultPearson.getPvalue() 
     2206    print "p-value of the Pearson Test = ", resultPearson.getPValue() 
    22072207 
    22082208    # Get the p-value threshold of the  Test 
     
    22212221 
    22222222    # Get the p-value of the Spearman Test 
    2223     print "p-value of the Spearman Test = ", resultSpearman.getPvalue() 
     2223    print "p-value of the Spearman Test = ", resultSpearman.getPValue() 
    22242224 
    22252225    # Get the p-value threshold of the  Test 
     
    22862286 
    22872287    # Get the p-value of the Pearson Test 
    2288         print "p-value of the Pearson Test = ", resultPartialPearson[i].getPvalue() 
     2288        print "p-value of the Pearson Test = ", resultPartialPearson[i].getPValue() 
    22892289 
    22902290    # Get the p-value threshold of the  Test 
     
    23222322 
    23232323    # Get the p-value of the Spearman Test 
    2324         print "p-value of the Spearman Test = ", resultPartialSpearman[i].getPvalue() 
     2324        print "p-value of the Spearman Test = ", resultPartialSpearman[i].getPValue() 
    23252325 
    23262326    # Get the p-value threshold of the  Test 
     
    23902390 
    23912391    # Get the p-value of the Regression Test 
    2392     print "p-value of the Regression Test = ", resultPartialRegression[i].getPvalue() 
     2392    print "p-value of the Regression Test = ", resultPartialRegression[i].getPValue() 
    23932393 
    23942394    # Get the p-value threshold of the  Test 
     
    24802480    # p-value : probability (test variable decision > test variable decision evaluated on the samples) 
    24812481    # Test = True (=1) <=> p-value > p-value threshold 
    2482     resultKolmogorov =  FittingTest().Kolmogorov(sample, estimatedBetaDistribution, 0.95) 
     2482    resultKolmogorov =  FittingTest.Kolmogorov(sample, Distribution(estimatedBetaDistribution), 0.95) 
    24832483 
    24842484    # Print result of the Kolmogorov Test 
     
    24862486 
    24872487    # Get the p-value of the Kolmogorov Test 
    2488     print "p-value of the Kolmogorov Test = ", resultKolmogorov.getPvalue() 
     2488    print "p-value of the Kolmogorov Test = ", resultKolmogorov.getPValue() 
    24892489 
    24902490    # Get the p-value threshold of the Kolmogorov Test 
     
    25362536    # Test = True (=1) <=> p-value > p-value threshold 
    25372537    # Number of parameters estimated from sample : 1 
    2538     resultChiSquared =  FittingTest().ChiSquared(sample, estimatedPoissonDistribution, 0.95, 1) 
     2538    resultChiSquared =  FittingTest.ChiSquared(sample, Distribution(estimatedPoissonDistribution), 0.95, 1) 
    25392539 
    25402540    # Print result of the ChiSquared Test 
     
    25422542 
    25432543    # Get the p-value threshold of the ChiSquared Test 
    2544     print "p-value threshold = ", resultChiSquared.getPvalue() 
     2544    print "p-value threshold = ", resultChiSquared.getPValue() 
    25452545 
    25462546    # Get the p-value threshold (corresponding to the confidence level) of the ChiSquared Test 
     
    26732673 
    26742674    # Get the p-value of the Anderson Darling Test 
    2675     print "p-value of the Anderson Darling Test = ", resultAndersonDarling.getPvalue() 
     2675    print "p-value of the Anderson Darling Test = ", resultAndersonDarling.getPValue() 
    26762676 
    26772677    # Get the p-value threshold of the Anderson Darling Test 
     
    26902690 
    26912691    # Get the p-value of the Cramer Von Mises Test 
    2692     print "p-value of the Cramer Von Mises Test = ", resultCramerVonMises.getPvalue() 
     2692    print "p-value of the Cramer Von Mises Test = ", resultCramerVonMises.getPValue() 
    26932693 
    26942694    # Get the p-value threshold of the Cramer Von Mises Test 
     
    32563256    # Get the p-value of the LMRSquared Test  
    32573257    # CARE : it is NOT a probability here! but the R^2 value 
    3258     print "p-value of the LMRSquared Test = ", resultLMRSquared1.getPvalue() 
     3258    print "p-value of the LMRSquared Test = ", resultLMRSquared1.getPValue() 
    32593259 
    32603260    # Get the p-value threshold of the LMRSquared Test 
     
    32843284    # Get the p-value of the LMAdjustedRSquared Test 
    32853285    # CARE : it is NOT a probability here! but the R^2 value 
    3286     print "p-value of the LMAdjustedRSquared Test = ", resultLMAdjustedRSquared1.getPvalue() 
     3286    print "p-value of the LMAdjustedRSquared Test = ", resultLMAdjustedRSquared1.getPValue() 
    32873287 
    32883288    # Get the p-value threshold of the LMAdjustedRSquared Test 
     
    33083308 
    33093309    # Get the p-value of the  LMFisherTest 
    3310     print "p-value of the LMFisher Test = ", resultLMFisher1.getPvalue() 
     3310    print "p-value of the LMFisher Test = ", resultLMFisher1.getPValue() 
    33113311 
    33123312    # Get the p-value threshold of the LMFisher Test 
     
    33313331 
    33323332    # Get the p-value of the  LMResidualMeanTest 
    3333     print "p-value of the LMResidualMean Test = ", resultLMResidualMean1.getPvalue() 
     3333    print "p-value of the LMResidualMean Test = ", resultLMResidualMean1.getPValue() 
    33343334 
    33353335    # Get the p-value threshold of the LMResidualMean Test 
     
    39763976    inputIncrease[1] = "F" 
    39773977 
    3978 # Describe the output vector of dimension 1 
     3978# Describe the output vector of dimension 4 
    39793979    outputIncrease = Description(4) 
    39803980    outputIncrease[0] = "E"  
     
    39873987    formulas[0] = "E" 
    39883988    formulas[1] = "F" 
    3989     formulas[2] = X2 
    3990     formulas[3] = X3 
     3989    formulas[2] = str(X2) 
     3990    formulas[3] = str(X3) 
    39913991    print "formulas=" , formulas  
    39923992 
     
    51455145# Create a NearestPoint algorithm with Cobyla  
    51465146    myCobyla = Cobyla() 
    5147     # Give default specific parameters to the Cobyla algoithm 
    5148     myCobyla.setSpecificParameters(CobylaSpecificParameters()) 
    5149     print "Specific Parameters of Cobyla = ", myCobyla.getSpecificParameters() 
     5147 
     5148    # The Cobyla algorithm has default specific parameters 
     5149    # To get them, write 
     5150    print "Default Parameters of Cobyla = ", myCobyla.getSpecificParameters() 
     5151 
     5152    # It is possible to change the default values of the specific parameters :  
     5153    # For that, create the object CobylaSpecificParameters() 
     5154    myCobylaSpecificParameters = CobylaSpecificParameters() 
     5155    # Then change the values of the parameters : for example, the RhoBeg parameter 
     5156    myCobylaSpecificParameters.setRhoBeg(myValue) 
     5157    # Give these new parameters to the Cobyla algoithm 
     5158    myCobyla.setSpecificParameters(myCobylaSpecificParameters) 
    51505159 
    51515160# We could have created a NearestPoint algorithm with AbdoRackwitz  
    51525161    # myAbdoRackwitz = AbdoRackwitz() 
    5153     # myAbdoRackwitz.setSpecificParameters(AbdoRackwitzSpecificParameters()) 
    5154     # print "Specific Parameters of AbdoRackwitz = ", myAbdoRackwitz.getSpecificParameters() 
    51555162 
    51565163# We could have created a NearestPoint algorithm with SQP  
    51575164    # mySQP = SQP() 
    5158     # mySQP.setSpecificParameters(SQPSpecificParameters()) 
    5159     # print "Specific Parameters of SQP = ", mySQP.getSpecificParameters() 
    5160  
    5161 # Change the parameters of the algorithm 
     5165 
     5166# Change the general parameters of the algorithm 
    51625167    myCobyla.setMaximumIterationsNumber(100) 
    51635168    myCobyla.setMaximumAbsoluteError(1.0e-10) 
     
    53995404# Create a NearestPoint algorithm with Cobyla  
    54005405    myCobyla = Cobyla() 
    5401     # Give default specific parameters to the Cobyla algoithm 
    5402     myCobyla.setSpecificParameters(CobylaSpecificParameters()) 
    5403     print "Specific Parameters of Cobyla = ", myCobyla.getSpecificParameters() 
     5406 
     5407    # The Cobyla algorithm has default specific parameters 
     5408    # To get them, write 
     5409    print "Default Parameters of Cobyla = ", myCobyla.getSpecificParameters() 
     5410 
     5411    # It is possible to change the default values of the specific parameters :  
     5412    # For that, create the object CobylaSpecificParameters() 
     5413    myCobylaSpecificParameters = CobylaSpecificParameters() 
     5414    # Then change the values of the parameters : for example, the RhoBeg parameter 
     5415    myCobylaSpecificParameters.setRhoBeg(myValue) 
     5416    # Give these new parameters to the Cobyla algoithm 
     5417    myCobyla.setSpecificParameters(myCobylaSpecificParameters) 
    54045418 
    54055419# We could have created a NearestPoint algorithm with AbdoRackwitz  
    54065420    # myAbdoRackwitz = AbdoRackwitz() 
    5407     # myAbdoRackwitz.setSpecificParameters(AbdoRackwitzSpecificParameters()) 
    5408  
    5409 # Change the parameters of the algorithm 
     5421 
     5422# We could have created a NearestPoint algorithm with SQP  
     5423    # mySQP = SQP() 
     5424 
     5425# Change the general parameters of the algorithm 
    54105426    myCobyla.setMaximumIterationsNumber(100) 
    54115427    myCobyla.setMaximumAbsoluteError(1.0e-10) 
     
    55945610    \item[$\bullet$]  Variance of the MonteCarlo probability estimator 
    55955611    \item[type] : NumericalScalar 
     5612    \item[$\bullet$]  the input and output samples used during the algorithm, and the values of the probability estimator and its variance 
     5613    \item[type] : NumericalSample 
    55965614  \end{description} 
    55975615} 
     
    57205738# stored according to the History Strategy specified 
    57215739# and used to draw the convergence graph 
    5722     myAlgo.getConvergenceStrategy().getSample() 
     5740    estimator_variance_sample = myAlgo.getConvergenceStrategy().getSample() 
    57235741\end{lstlisting} 
    57245742\espace 
     
    69126930# We create a NearestPoint algorithm  
    69136931myCobyla = Cobyla() 
    6914 myCobyla.setSpecificParameters(CobylaSpecificParameters()) 
    69156932myCobyla.setMaximumIterationsNumber(1000) 
    69166933myCobyla.setMaximumAbsoluteError(1.0e-10) 
  • branches/chaos/doc/src/UserManual/Distribution_UserManual.tex

    r883 r980  
    20092009        \item[Some methods :]  \strut  
    20102010                \begin{description} 
    2011                         \item $getNormalCorrelationFromKendallCorrelation$ 
    2012                                         \begin{description} 
    2013                                                 \item[Usage :] $NormalCopulagetNormalCorrelationFromKendallCorrelation(K)$ 
     2011                        \item $GetNormalCorrelationFromKendallCorrelation$ 
     2012                                        \begin{description} 
     2013                                                \item[Usage :] $NormaCopula.GetNormalCorrelationFromKendallCorrelation(K)$ 
    20142014                                                \item[Arguments :] $K$ : a CorrelationMatrix, it must be the Kendall correlation matrix of the considered random vector 
    20152015                                                \item[Value :] a CorrelationMatrix, the correlation matrix of the normal copula evaluated from the Kendall correlation matrix $K$ 
     
    20172017                        \bigskip 
    20182018                                 
    2019                         \item $getNormalCorrelationFromSpearmanCorrelation$ 
    2020                                         \begin{description} 
    2021                                                 \item[Usage :] $NormalCopula.getNormalCorrelationFromSpearmanCorrelation(S)$ 
     2019                        \item $GetNormalCorrelationFromSpearmanCorrelation$ 
     2020                                        \begin{description} 
     2021                                                \item[Usage :] $NormalCopula.GetNormalCorrelationFromSpearmanCorrelation(S)$ 
    20222022                                                \item[Arguments :]$S$ : a CorrelationMatrix, it must be the Spearman correlation matrix of the considered random vector 
    20232023                                                \item[Value :] a CorrelationMatrix, the correlation matrix of the normal copula evaluated from the Spearman correlation matrix $S$ 
  • branches/chaos/doc/src/UserManual/Graphs_UserManual.tex

    r883 r980  
    8787                                                \item[Usage :] $getBoundingBox()$ 
    8888                                                \item[Arguments :] none 
    89                                                 \item[Value :] a NumericalPoint of dimension 4, the bounding box of the drawable element, wich is a rectangle determined by its low and left corner (P1) and its high and right corner (P2). The BoundingBox is (XP1,YP1, XP2, YP2)
     89                                                \item[Value :] a NumericalPoint of dimension 4, the bounding box of the drawable element, wich is a rectangle determined by its range along X and its range along Y. The BoundingBox is  $(x_{min}, x_{max}, y_{min}, y_{max})$
    9090                                        \end{description} 
    9191                \bigskip 
     
    202202                                                \item[Usage :] $getBoundingBox()$ 
    203203                                                \item[Arguments :] none 
    204                                                 \item[Value :] a NumericalPoint of dimension 4, the bounding bow of the drawable element, wich is a rectangle determined by its low and left corner (P1)and its high and right corner (P2). The BoundingBox is (XP1,YP1, XP2, YP2)
     204                                                \item[Value :] a NumericalPoint of dimension 4, the bounding bow of the drawable element, wich is a rectangle determined by its range along X and its range along Y. The BoundingBox is $(x_{min}, x_{max}, y_{min}, y_{max})$
    205205                                        \end{description} 
    206206                \bigskip 
  • branches/chaos/lib/m4/Makefile.am

    r968 r980  
    4646examplesdir      = $(pkgdatadir)/examples 
    4747examplesM4dir    = $(pkgdatadir)/examples/m4 
     48 
     49dataFiles        = examples/Makefile.am 
     50dataFiles       += examples/bootstrap 
     51dataFiles       += examples/README 
     52dataFiles       += examples/AUTHORS 
     53m4Files          = examples/m4/ot_check_boost.m4 
     54m4Files         += examples/m4/ot_check_openturns.m4 
     55m4Files         += examples/m4/ot_check_qt.m4 
     56m4Files         += examples/m4/bnv_have_qt.m4 
     57 
    4858examples_DATA    = examples/configure.ac 
    49 examples_DATA   += examples/Makefile.am 
    50 examples_DATA   += examples/bootstrap 
    51 examples_DATA   += examples/README 
    52 examples_DATA   += examples/AUTHORS 
    53 examplesM4_DATA  = examples/m4/ot_check_boost.m4  
    54 examplesM4_DATA += examples/m4/ot_check_openturns.m4 
    55 examplesM4_DATA += examples/m4/ot_check_qt.m4 
    56 examplesM4_DATA += examples/m4/bnv_have_qt.m4 
     59examples_DATA   += $(dataFiles) 
     60examplesM4_DATA  = $(m4Files) 
     61 
     62EXTRA_DIST      += examples/configure.ac.in 
     63EXTRA_DIST      += $(dataFiles) 
     64EXTRA_DIST      += $(m4Files) 
    5765 
    5866install-data-hook: 
    5967        -( cd $(examplesdir) && chmod +x bootstrap && ./bootstrap ) 
     68 
     69uninstall-hook: 
     70        rm -rf $(examplesdir)/COPYING 
     71        rm -rf $(examplesdir)/NEWS 
     72        rm -rf $(examplesdir)/ChangeLog 
     73        rm -rf $(examplesdir)/INSTALL 
     74        rm -rf $(examplesdir)/Makefile.in 
     75        rm -rf $(examplesdir)/configure 
     76        rm -rf $(examplesdir)/*.m4 
     77        rm -rf $(examplesdir)/autom4te.cache 
     78        rm -rf $(examplesdir)/config 
     79        rm -rf $(examplesdir)/m4 
    6080 
    6181examples/configure.ac : configure-stamp-h 
     
    6383        (cd $(top_builddir) && CONFIG_FILES=m4/examples/configure.ac ./config.status) 
    6484        echo > $@ 
     85 
     86DISTCLEANFILES = configure-stamp-h  
  • branches/chaos/lib/src/Base/Common/Makefile.am

    r954 r980  
    4848        StorageManager.hxx \ 
    4949        XMLStorageManager.hxx \ 
    50         WrapperFile.hxx \ 
    51         WrapperData.hxx \ 
    5250        WrapperInterface.h \ 
    5351        Path.hxx \ 
     
    9088        StorageManager.cxx \ 
    9189        XMLStorageManager.cxx \ 
    92         WrapperFile.cxx \ 
    93         WrapperData.cxx \ 
    9490        Path.cxx \ 
    9591        ComparisonOperator.cxx \ 
     
    124120 
    125121 
    126  
    127 if WITH_XERCESC 
    128 AM_CPPFLAGS            += -I@xercesc_include_path@ 
    129 libOTCommon_la_LDFLAGS += -L@xercesc_lib_path@ 
    130 libOTCommon_la_LIBADD  += -l@xercesc_lib_name@ 
    131 libOTCommon_la_SOURCES += \ 
    132         XMLWrapperErrorHandler.cxx 
    133 otinclude_HEADERS      += \ 
    134         XMLStringConverter.hxx \ 
    135         StringXMLConverter.hxx \ 
    136         XMLWrapperErrorHandler.hxx \ 
    137         XMLTags.hxx 
    138 endif 
  • branches/chaos/lib/src/Base/Func/ComputedNumericalMathEvaluationImplementation.hxx

    r862 r980  
    5050 
    5151        /* Some typedefs to ease reading */ 
    52         typedef Common::WrapperFile                                             WrapperFile; 
    5352        typedef Common::WrapperInternalException                                WrapperInternalException; 
    5453        typedef NumericalMathEvaluationImplementation::InvalidArgumentException InvalidArgumentException; 
  • branches/chaos/lib/src/Base/Func/ComputedNumericalMathEvaluationImplementationFactory.cxx

    r954 r980  
    7979 
    8080        try { 
    81           // Find the path of the wrapper file that describes the numerical 
    82           // math function interface 
    83           wrapperPath = Common::WrapperFile::FindWrapperPathByName( functionName ); 
    84            
    85 #ifdef DEBUG 
    86           Log::Debug(OSS() << "Successful search of wrapper file located at " << wrapperPath); 
    87 #endif 
    8881          // Open the wrapper file and get the name of the library and the names of 
    8982          // the function, its gradient and its hessian if defined 
     
    9184          // Then create the actual functions 
    9285          // Get also the data read inside the wrapper file and pass them to the wrapper 
    93           Common::WrapperFile wrapperFile( wrapperPath ); 
     86          WrapperFile wrapperFile = WrapperFile::FindWrapperByName( functionName ); 
     87#ifdef DEBUG 
     88          Log::Debug(OSS() << "Successful search of wrapper file located at " << wrapperFile.getDescriptionFilePath() ); 
     89#endif 
    9490 
    9591          implementation = new ComputedNumericalMathEvaluationImplementation( functionName, wrapperFile ); 
  • branches/chaos/lib/src/Base/Func/ComputedNumericalMathGradientImplementation.hxx

    r862 r980  
    5858 
    5959        /* Some typedefs to ease reading */ 
    60         typedef Common::WrapperFile WrapperFile; 
    61         typedef Common::WrapperInternalException WrapperInternalException; 
     60        typedef Common::WrapperInternalException                              WrapperInternalException; 
    6261        typedef NumericalMathGradientImplementation::InvalidArgumentException InvalidArgumentException; 
    63         typedef NumericalMathGradientImplementation::InternalException InternalException; 
    64         typedef Common::Pointer<WrapperObject> InternalGradient; 
    65         typedef NumericalMathGradientImplementation::NumericalPoint NumericalPoint; 
    66         typedef NumericalMathGradientImplementation::Matrix Matrix; 
     62        typedef NumericalMathGradientImplementation::InternalException        InternalException; 
     63        typedef Common::Pointer<WrapperObject>                                InternalGradient; 
     64        typedef NumericalMathGradientImplementation::NumericalPoint           NumericalPoint; 
     65        typedef NumericalMathGradientImplementation::Matrix                   Matrix; 
    6766 
    6867        /** Default constructor */ 
  • branches/chaos/lib/src/Base/Func/ComputedNumericalMathGradientImplementationFactory.cxx

    r954 r980  
    8787 
    8888        try { 
    89           // Find the path of the wrapper file that describes the numerical 
    90           // math function interface 
    91           wrapperPath = OT::Base::Common::WrapperFile::FindWrapperPathByName( functionName ); 
    92            
    93 #ifdef DEBUG 
    94           Log::Debug( OSS() << "Successful search of wrapper file located at " << wrapperPath ); 
    95 #endif 
    9689          // Open the wrapper file and get the name of the library and the names of 
    9790          // the function, its gradient and its hessian if defined 
     
    9992          // Then create the actual functions 
    10093          // Get also the data read inside the wrapper file and pass them to the wrapper 
    101           OT::Base::Common::WrapperFile wrapperFile( wrapperPath ); 
     94          WrapperFile wrapperFile = WrapperFile::FindWrapperByName( functionName ); 
     95#ifdef DEBUG 
     96          Log::Debug(OSS() << "Successful search of wrapper file located at " << wrapperFile.getDescriptionFilePath() ); 
     97#endif 
    10298 
    10399          implementation = new ComputedNumericalMathGradientImplementation( functionName, wrapperFile ); 
  • branches/chaos/lib/src/Base/Func/ComputedNumericalMathHessianImplementation.hxx

    r862 r980  
    5858 
    5959        /* Some typedefs to ease reading */ 
    60         typedef Common::WrapperFile WrapperFile; 
    61         typedef Common::WrapperInternalException WrapperInternalException; 
     60        typedef Common::WrapperInternalException                             WrapperInternalException; 
    6261        typedef NumericalMathHessianImplementation::InvalidArgumentException InvalidArgumentException; 
    63         typedef NumericalMathHessianImplementation::InternalException InternalException; 
    64         typedef Common::Pointer<WrapperObject> InternalHessian; 
    65         typedef NumericalMathHessianImplementation::NumericalPoint NumericalPoint; 
    66         typedef NumericalMathHessianImplementation::SymmetricTensor SymmetricTensor; 
     62        typedef NumericalMathHessianImplementation::InternalException        InternalException; 
     63        typedef Common::Pointer<WrapperObject>                               InternalHessian; 
     64        typedef NumericalMathHessianImplementation::NumericalPoint           NumericalPoint; 
     65        typedef NumericalMathHessianImplementation::SymmetricTensor          SymmetricTensor; 
    6766 
    6867        /** Default constructor */ 
  • branches/chaos/lib/src/Base/Func/ComputedNumericalMathHessianImplementationFactory.cxx

    r954 r980  
    8787 
    8888        try { 
    89           // Find the path of the wrapper file that describes the numerical 
    90           // math function interface 
    91           wrapperPath = OT::Base::Common::WrapperFile::FindWrapperPathByName( functionName ); 
    92            
    93 #ifdef DEBUG 
    94           Log::Debug( OSS() << "Successful search of wrapper file located at " << wrapperPath ); 
    95 #endif 
    9689          // Open the wrapper file and get the name of the library and the names of 
    9790          // the function, its gradient and its hessian if defined 
     
    9992          // Then create the actual functions 
    10093          // Get also the data read inside the wrapper file and pass them to the wrapper 
    101           OT::Base::Common::WrapperFile wrapperFile( wrapperPath ); 
     94          WrapperFile wrapperFile = WrapperFile::FindWrapperByName( functionName ); 
     95#ifdef DEBUG 
     96          Log::Debug(OSS() << "Successful search of wrapper file located at " << wrapperFile.getDescriptionFilePath() ); 
     97#endif 
    10298 
    10399          implementation = new ComputedNumericalMathHessianImplementation( functionName, wrapperFile ); 
  • branches/chaos/lib/src/Base/Func/Makefile.am

    r954 r980  
    3838        Library.hxx \ 
    3939        LibraryLoader.hxx \ 
     40        WrapperData.hxx \ 
     41        WrapperFile.hxx \ 
    4042        WrapperObject.hxx \ 
    4143        NumericalMathFunction.hxx \ 
     
    8688        Library.cxx \ 
    8789        LibraryLoader.cxx \ 
     90        WrapperData.cxx \ 
     91        WrapperFile.cxx \ 
    8892        WrapperObject.cxx \ 
    8993        NumericalMathFunction.cxx \ 
     
    128132 
    129133libOTFunc_la_LIBADD   = $(builddir)/MuParser/libOTMuParser.la 
     134 
     135 
     136if WITH_XERCESC 
     137AM_CPPFLAGS          += -I@xercesc_include_path@ 
     138libOTFunc_la_LDFLAGS += -L@xercesc_lib_path@ 
     139libOTFunc_la_LIBADD  += -l@xercesc_lib_name@ 
     140libOTFunc_la_SOURCES += \ 
     141        XMLWrapperErrorHandler.cxx 
     142otinclude_HEADERS    += \ 
     143        XMLStringConverter.hxx \ 
     144        StringXMLConverter.hxx \ 
     145        XMLWrapperErrorHandler.hxx \ 
     146        XMLTags.hxx 
     147endif 
  • branches/chaos/lib/src/Base/Func/NumericalMathFunction.cxx

    r954 r980  
    132132      } 
    133133 
     134      /* Constructor from a wrapper file */ 
     135      NumericalMathFunction::NumericalMathFunction(const WrapperFile & wrapperFile) 
     136        : Common::TypedInterfaceObject<NumericalMathFunctionImplementation>(new NumericalMathFunctionImplementation(wrapperFile)) 
     137      { 
     138        // Nothing to do 
     139      } 
     140 
    134141      /* Comparison operator */ 
    135142      Bool NumericalMathFunction::operator ==(const NumericalMathFunction & other) const 
  • branches/chaos/lib/src/Base/Func/NumericalMathFunction.hxx

    r954 r980  
    119119#endif 
    120120 
     121        /** Constructor from a wrapper file */ 
     122        NumericalMathFunction(const WrapperFile & wrapperFile); 
     123 
    121124        /** Comparison operator */ 
    122125        Bool operator ==(const NumericalMathFunction & other) const; 
  • branches/chaos/lib/src/Base/Func/NumericalMathFunctionImplementation.cxx

    r954 r980  
    3737#include "CenteredFiniteDifferenceHessian.hxx" 
    3838#include "PersistentObjectFactory.hxx" 
    39 #include "WrapperFile.hxx" 
    4039#include "Log.hxx" 
    4140#include "OSS.hxx" 
     
    7473      } 
    7574 
    76       /* Default constructor */ 
     75      /* Constructor from a wrapper name */ 
    7776      NumericalMathFunctionImplementation::NumericalMathFunctionImplementation(const String & name) 
    7877        : PersistentObject(name), 
     
    8483          p_initialHessianImplementation_(p_hessianImplementation_) 
    8584      { 
    86         // We need to constructs object in the body because of some useful temporary 
    87         // It also speeds the creation of the object because the wrapper file is parsed only once 
    88         FileName wrapperPath; 
    89            
    90         // Find the path of the wrapper file that describes the numerical 
    91         // math function interface 
    92         Log::Debug(OSS() << "Try loading a wrapper for function '" << name << "'"); 
    93         wrapperPath = Common::WrapperFile::FindWrapperPathByName( name ); 
    94            
    95         // Open the wrapper file and get the name of the library and the names of 
    96         // the function, its gradient and its hessian if defined 
    97         // If the gradient or the hessian are not defined, ask for default ones 
    98         // Then create the actual functions 
    99         // Get also the data read inside the wrapper file and pass them to the wrapper 
    100         Common::WrapperFile wrapperFile( wrapperPath ); 
    101            
     85        // Read the description file of the wrapper 
     86        WrapperFile wrapperFile = WrapperFile::FindWrapperByName( name ); 
     87         
     88        // We set the implementations 
     89        initImplementations( wrapperFile ); 
     90      } 
     91 
     92      /* Constructor from a wrapper file */ 
     93      NumericalMathFunctionImplementation::NumericalMathFunctionImplementation(const WrapperFile & wrapperFile) 
     94        : PersistentObject(wrapperFile.getName()), 
     95          p_evaluationImplementation_(new NoNumericalMathEvaluationImplementation), 
     96          p_gradientImplementation_(new NoNumericalMathGradientImplementation), 
     97          p_hessianImplementation_(new NoNumericalMathHessianImplementation), 
     98          p_initialEvaluationImplementation_(p_evaluationImplementation_), 
     99          p_initialGradientImplementation_(p_gradientImplementation_), 
     100          p_initialHessianImplementation_(p_hessianImplementation_) 
     101      { 
     102        // We set the implementations 
     103        initImplementations( wrapperFile ); 
     104      } 
     105 
     106 
     107      /* This method set the implementations with the values listed in the wrapper file */ 
     108      void NumericalMathFunctionImplementation::initImplementations(const WrapperFile & wrapperFile) 
     109      { 
     110        const String name = wrapperFile.getName(); 
     111 
    102112        ComputedNumericalMathEvaluationImplementation * implementation = new ComputedNumericalMathEvaluationImplementation( name, wrapperFile ); 
    103113        p_evaluationImplementation_.reset(implementation); 
     
    117127          p_hessianImplementation_.reset(new CenteredFiniteDifferenceHessian(sqrt(CenteredFiniteDifferenceHessian::DefaultEpsilon), p_evaluationImplementation_)); 
    118128        } 
    119  
    120       } 
     129      } 
     130 
    121131 
    122132      /* Analytical formula constructor */ 
  • branches/chaos/lib/src/Base/Func/NumericalMathFunctionImplementation.hxx

    r954 r980  
    3838#include "NumericalMathHessianImplementation.hxx" 
    3939#include "Description.hxx" 
     40#include "WrapperFile.hxx" 
    4041 
    4142namespace OpenTURNS { 
     
    107108        NumericalMathFunctionImplementation(); 
    108109 
    109         /** Default constructor */ 
     110        /** Constructor from a wrapper name */ 
    110111        NumericalMathFunctionImplementation(const String & name); 
     112 
     113        /** Constructor from a wrapper file */ 
     114        NumericalMathFunctionImplementation(const WrapperFile & wrapperFile); 
    111115 
    112116        /** Analytical formula constructor */ 
     
    249253        void setInitialHessianImplementation(const HessianImplementation & p_initialHessianImplementation); 
    250254     
     255        /* This method set the implementations with the values listed in the wrapper file */ 
     256        void initImplementations(const WrapperFile & wrapperFile); 
     257 
    251258      private: 
    252259        /* A pointer on the actual numerical math function implementation */ 
  • branches/chaos/lib/src/Base/Func/WrapperObject.cxx

    r968 r980  
    260260 
    261261      /* Data accessor */ 
    262       const Common::WrapperData & WrapperObject::getWrapperData() const 
     262      const WrapperData & WrapperObject::getWrapperData() const 
    263263      { 
    264264        return data_; 
     
    288288        Description description; 
    289289        WrapperData::VariableListType variableList(data_.getVariableList()); 
    290         for (UnsignedLong i = 0; i < variableList.size(); i++) description.add(variableList[i].id_); 
     290        for (UnsignedLong i = 0; i < variableList.getSize(); ++i) description.add(variableList[i].id_); 
    291291        return description; 
    292292      } 
  • branches/chaos/lib/src/Base/Func/WrapperObject.hxx

    r954 r980  
    6565        typedef Common::WrapperInternalException WrapperInternalException; 
    6666        typedef Common::InvalidArgumentException InvalidArgumentException; 
    67         typedef Common::WrapperData              WrapperData; 
    6867        typedef Type::NumericalPoint             NumericalPoint; 
    6968        typedef Stat::NumericalSample            NumericalSample; 
     
    151150        /** Data accessor */ 
    152151        void setWrapperData(const WrapperData & data); 
    153         const Common::WrapperData & getWrapperData() const; 
     152        const WrapperData & getWrapperData() const; 
    154153 
    155154 
  • branches/chaos/lib/test/t_Waarts_25_quadratic_terms.cxx

    • Property svn:executable deleted
  • branches/chaos/python/src/Makefile.am

    r954 r980  
    6262        Object.i \ 
    6363        PersistentObject.i \ 
    64         Pointer.i \ 
    65         InterfaceObject.i \ 
    66         TypedInterfaceObject.i \ 
    67         TypedCollectionInterfaceObject.i \ 
    6864        Study.i \ 
    6965        StorageManager.i \ 
     
    8177        BoostPointerImplementation.i \ 
    8278        PlatformInfo.i \ 
     79        Pointer.i \ 
     80        InterfaceObject.i \ 
     81        TypedInterfaceObject.i \ 
     82        TypedCollectionInterfaceObject.i \ 
    8383        Collection.i \ 
    8484        PersistentCollection.i \ 
     
    139139        Pie.i \ 
    140140        Staircase.i \ 
     141        WrapperData.i \ 
     142        WrapperFile.i \ 
    141143        NumericalMathEvaluationImplementation.i \ 
    142144        NumericalMathGradientImplementation.i \ 
     
    394396#       RandomGenerator.hxx \ 
    395397#       CorrelationAnalysis.hxx \ 
     398#       WrapperData.hxx \ 
     399#       WrapperFile.hxx \