Changeset 980
- Timestamp:
- 10/22/08 08:25:27 (3 months ago)
- Files:
-
- branches/chaos/doc/src/UseCasesGuide/OpenTURNS_UseCasesGuide.tex (modified) (26 diffs)
- branches/chaos/doc/src/UserManual/Distribution_UserManual.tex (modified) (2 diffs)
- branches/chaos/doc/src/UserManual/Graphs_UserManual.tex (modified) (2 diffs)
- branches/chaos/lib/m4/Makefile.am (modified) (2 diffs)
- branches/chaos/lib/src/Base/Common/Makefile.am (modified) (3 diffs)
- branches/chaos/lib/src/Base/Common/StringXMLConverter.hxx (deleted)
- branches/chaos/lib/src/Base/Common/WrapperData.cxx (deleted)
- branches/chaos/lib/src/Base/Common/WrapperData.hxx (deleted)
- branches/chaos/lib/src/Base/Common/WrapperFile.cxx (deleted)
- branches/chaos/lib/src/Base/Common/WrapperFile.hxx (deleted)
- branches/chaos/lib/src/Base/Common/XMLStringConverter.hxx (deleted)
- branches/chaos/lib/src/Base/Common/XMLTags.hxx (deleted)
- branches/chaos/lib/src/Base/Common/XMLWrapperErrorHandler.cxx (deleted)
- branches/chaos/lib/src/Base/Common/XMLWrapperErrorHandler.hxx (deleted)
- branches/chaos/lib/src/Base/Func/ComputedNumericalMathEvaluationImplementation.hxx (modified) (1 diff)
- branches/chaos/lib/src/Base/Func/ComputedNumericalMathEvaluationImplementationFactory.cxx (modified) (2 diffs)
- branches/chaos/lib/src/Base/Func/ComputedNumericalMathGradientImplementation.hxx (modified) (1 diff)
- branches/chaos/lib/src/Base/Func/ComputedNumericalMathGradientImplementationFactory.cxx (modified) (2 diffs)
- branches/chaos/lib/src/Base/Func/ComputedNumericalMathHessianImplementation.hxx (modified) (1 diff)
- branches/chaos/lib/src/Base/Func/ComputedNumericalMathHessianImplementationFactory.cxx (modified) (2 diffs)
- branches/chaos/lib/src/Base/Func/Makefile.am (modified) (3 diffs)
- branches/chaos/lib/src/Base/Func/NumericalMathFunction.cxx (modified) (1 diff)
- branches/chaos/lib/src/Base/Func/NumericalMathFunction.hxx (modified) (1 diff)
- branches/chaos/lib/src/Base/Func/NumericalMathFunctionImplementation.cxx (modified) (4 diffs)
- branches/chaos/lib/src/Base/Func/NumericalMathFunctionImplementation.hxx (modified) (3 diffs)
- branches/chaos/lib/src/Base/Func/StringXMLConverter.hxx (copied) (copied from trunk/lib/src/Base/Func/StringXMLConverter.hxx)
- branches/chaos/lib/src/Base/Func/WrapperData.cxx (copied) (copied from trunk/lib/src/Base/Func/WrapperData.cxx)
- branches/chaos/lib/src/Base/Func/WrapperData.hxx (copied) (copied from trunk/lib/src/Base/Func/WrapperData.hxx)
- branches/chaos/lib/src/Base/Func/WrapperFile.cxx (copied) (copied from trunk/lib/src/Base/Func/WrapperFile.cxx)
- branches/chaos/lib/src/Base/Func/WrapperFile.hxx (copied) (copied from trunk/lib/src/Base/Func/WrapperFile.hxx)
- branches/chaos/lib/src/Base/Func/WrapperObject.cxx (modified) (2 diffs)
- branches/chaos/lib/src/Base/Func/WrapperObject.hxx (modified) (2 diffs)
- branches/chaos/lib/src/Base/Func/XMLStringConverter.hxx (copied) (copied from trunk/lib/src/Base/Func/XMLStringConverter.hxx)
- branches/chaos/lib/src/Base/Func/XMLTags.hxx (copied) (copied from trunk/lib/src/Base/Func/XMLTags.hxx)
- branches/chaos/lib/src/Base/Func/XMLWrapperErrorHandler.cxx (copied) (copied from trunk/lib/src/Base/Func/XMLWrapperErrorHandler.cxx)
- branches/chaos/lib/src/Base/Func/XMLWrapperErrorHandler.hxx (copied) (copied from trunk/lib/src/Base/Func/XMLWrapperErrorHandler.hxx)
- branches/chaos/lib/test/t_Waarts_25_quadratic_terms.cxx (modified) (1 prop)
- branches/chaos/python/src/Makefile.am (modified) (4 diffs)
- branches/chaos/python/src/NumericalMathFunction.i (modified) (1 diff)
- branches/chaos/python/src/NumericalPoint.i (modified) (1 diff)
- branches/chaos/python/src/PythonNumericalMathEvaluationImplementation.cxx (modified) (1 diff)
- branches/chaos/python/src/PythonNumericalMathEvaluationImplementation.hxx (modified) (1 diff)
- branches/chaos/python/src/WrapperData.i (copied) (copied from trunk/python/src/WrapperData.i)
- branches/chaos/python/src/WrapperFile.i (copied) (copied from trunk/python/src/WrapperFile.i)
- branches/chaos/python/src/ot.i (modified) (2 diffs)
- branches/chaos/python/test/Makefile.am (modified) (2 diffs)
- branches/chaos/python/test/python_installcheck_testsuite.at (modified) (1 diff)
- branches/chaos/python/test/t_NumericalPoint_python.atpy (copied) (copied from trunk/python/test/t_NumericalPoint_python.atpy)
- branches/chaos/python/test/t_NumericalPoint_python.py (copied) (copied from trunk/python/test/t_NumericalPoint_python.py)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/chaos/doc/src/UseCasesGuide/OpenTURNS_UseCasesGuide.tex
r883 r980 1033 1033 # Create the correlation matrix R of the normal copula 1034 1034 # from the Spearman correlation matrix S 1035 R = NormalCopula. getNormalCorrelationFromSpearmanCorrelation(S)1035 R = NormalCopula.GetNormalCorrelationFromSpearmanCorrelation(S) 1036 1036 1037 1037 # Create the normal copula from the R correlation matrix … … 1476 1476 # CARE : if the dimension is >1 1477 1477 # For example, with dimension 2, at pointVector=(2.3, 4.5) 1478 pointVector = Numeri aclPoint(2)1478 pointVector = NumericalPoint(2) 1479 1479 pointVector[0] = 2.3 1480 1480 pointVector[1] = 4.5 … … 2114 2114 2115 2115 # Get the p-value of the Smirnov Test 2116 print "p-value of the Smirnov Test = ", resultSmirnov.getP value()2116 print "p-value of the Smirnov Test = ", resultSmirnov.getPValue() 2117 2117 2118 2118 # Get the p-value threshold of the Test … … 2187 2187 2188 2188 # Get the p-value of the Test 2189 print "p-value of the Test = ", resultChiSquared.getP value()2189 print "p-value of the Test = ", resultChiSquared.getPValue() 2190 2190 2191 2191 # Get the p-value threshold of the ChiSquared Test … … 2204 2204 2205 2205 # Get the p-value of the Pearson Test 2206 print "p-value of the Pearson Test = ", resultPearson.getP value()2206 print "p-value of the Pearson Test = ", resultPearson.getPValue() 2207 2207 2208 2208 # Get the p-value threshold of the Test … … 2221 2221 2222 2222 # Get the p-value of the Spearman Test 2223 print "p-value of the Spearman Test = ", resultSpearman.getP value()2223 print "p-value of the Spearman Test = ", resultSpearman.getPValue() 2224 2224 2225 2225 # Get the p-value threshold of the Test … … 2286 2286 2287 2287 # Get the p-value of the Pearson Test 2288 print "p-value of the Pearson Test = ", resultPartialPearson[i].getP value()2288 print "p-value of the Pearson Test = ", resultPartialPearson[i].getPValue() 2289 2289 2290 2290 # Get the p-value threshold of the Test … … 2322 2322 2323 2323 # Get the p-value of the Spearman Test 2324 print "p-value of the Spearman Test = ", resultPartialSpearman[i].getP value()2324 print "p-value of the Spearman Test = ", resultPartialSpearman[i].getPValue() 2325 2325 2326 2326 # Get the p-value threshold of the Test … … 2390 2390 2391 2391 # Get the p-value of the Regression Test 2392 print "p-value of the Regression Test = ", resultPartialRegression[i].getP value()2392 print "p-value of the Regression Test = ", resultPartialRegression[i].getPValue() 2393 2393 2394 2394 # Get the p-value threshold of the Test … … 2480 2480 # p-value : probability (test variable decision > test variable decision evaluated on the samples) 2481 2481 # 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) 2483 2483 2484 2484 # Print result of the Kolmogorov Test … … 2486 2486 2487 2487 # Get the p-value of the Kolmogorov Test 2488 print "p-value of the Kolmogorov Test = ", resultKolmogorov.getP value()2488 print "p-value of the Kolmogorov Test = ", resultKolmogorov.getPValue() 2489 2489 2490 2490 # Get the p-value threshold of the Kolmogorov Test … … 2536 2536 # Test = True (=1) <=> p-value > p-value threshold 2537 2537 # 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) 2539 2539 2540 2540 # Print result of the ChiSquared Test … … 2542 2542 2543 2543 # Get the p-value threshold of the ChiSquared Test 2544 print "p-value threshold = ", resultChiSquared.getP value()2544 print "p-value threshold = ", resultChiSquared.getPValue() 2545 2545 2546 2546 # Get the p-value threshold (corresponding to the confidence level) of the ChiSquared Test … … 2673 2673 2674 2674 # Get the p-value of the Anderson Darling Test 2675 print "p-value of the Anderson Darling Test = ", resultAndersonDarling.getP value()2675 print "p-value of the Anderson Darling Test = ", resultAndersonDarling.getPValue() 2676 2676 2677 2677 # Get the p-value threshold of the Anderson Darling Test … … 2690 2690 2691 2691 # Get the p-value of the Cramer Von Mises Test 2692 print "p-value of the Cramer Von Mises Test = ", resultCramerVonMises.getP value()2692 print "p-value of the Cramer Von Mises Test = ", resultCramerVonMises.getPValue() 2693 2693 2694 2694 # Get the p-value threshold of the Cramer Von Mises Test … … 3256 3256 # Get the p-value of the LMRSquared Test 3257 3257 # CARE : it is NOT a probability here! but the R^2 value 3258 print "p-value of the LMRSquared Test = ", resultLMRSquared1.getP value()3258 print "p-value of the LMRSquared Test = ", resultLMRSquared1.getPValue() 3259 3259 3260 3260 # Get the p-value threshold of the LMRSquared Test … … 3284 3284 # Get the p-value of the LMAdjustedRSquared Test 3285 3285 # CARE : it is NOT a probability here! but the R^2 value 3286 print "p-value of the LMAdjustedRSquared Test = ", resultLMAdjustedRSquared1.getP value()3286 print "p-value of the LMAdjustedRSquared Test = ", resultLMAdjustedRSquared1.getPValue() 3287 3287 3288 3288 # Get the p-value threshold of the LMAdjustedRSquared Test … … 3308 3308 3309 3309 # Get the p-value of the LMFisherTest 3310 print "p-value of the LMFisher Test = ", resultLMFisher1.getP value()3310 print "p-value of the LMFisher Test = ", resultLMFisher1.getPValue() 3311 3311 3312 3312 # Get the p-value threshold of the LMFisher Test … … 3331 3331 3332 3332 # Get the p-value of the LMResidualMeanTest 3333 print "p-value of the LMResidualMean Test = ", resultLMResidualMean1.getP value()3333 print "p-value of the LMResidualMean Test = ", resultLMResidualMean1.getPValue() 3334 3334 3335 3335 # Get the p-value threshold of the LMResidualMean Test … … 3976 3976 inputIncrease[1] = "F" 3977 3977 3978 # Describe the output vector of dimension 13978 # Describe the output vector of dimension 4 3979 3979 outputIncrease = Description(4) 3980 3980 outputIncrease[0] = "E" … … 3987 3987 formulas[0] = "E" 3988 3988 formulas[1] = "F" 3989 formulas[2] = X23990 formulas[3] = X33989 formulas[2] = str(X2) 3990 formulas[3] = str(X3) 3991 3991 print "formulas=" , formulas 3992 3992 … … 5145 5145 # Create a NearestPoint algorithm with Cobyla 5146 5146 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) 5150 5159 5151 5160 # We could have created a NearestPoint algorithm with AbdoRackwitz 5152 5161 # myAbdoRackwitz = AbdoRackwitz() 5153 # myAbdoRackwitz.setSpecificParameters(AbdoRackwitzSpecificParameters())5154 # print "Specific Parameters of AbdoRackwitz = ", myAbdoRackwitz.getSpecificParameters()5155 5162 5156 5163 # We could have created a NearestPoint algorithm with SQP 5157 5164 # 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 5162 5167 myCobyla.setMaximumIterationsNumber(100) 5163 5168 myCobyla.setMaximumAbsoluteError(1.0e-10) … … 5399 5404 # Create a NearestPoint algorithm with Cobyla 5400 5405 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) 5404 5418 5405 5419 # We could have created a NearestPoint algorithm with AbdoRackwitz 5406 5420 # 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 5410 5426 myCobyla.setMaximumIterationsNumber(100) 5411 5427 myCobyla.setMaximumAbsoluteError(1.0e-10) … … 5594 5610 \item[$\bullet$] Variance of the MonteCarlo probability estimator 5595 5611 \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 5596 5614 \end{description} 5597 5615 } … … 5720 5738 # stored according to the History Strategy specified 5721 5739 # and used to draw the convergence graph 5722 myAlgo.getConvergenceStrategy().getSample()5740 estimator_variance_sample = myAlgo.getConvergenceStrategy().getSample() 5723 5741 \end{lstlisting} 5724 5742 \espace … … 6912 6930 # We create a NearestPoint algorithm 6913 6931 myCobyla = Cobyla() 6914 myCobyla.setSpecificParameters(CobylaSpecificParameters())6915 6932 myCobyla.setMaximumIterationsNumber(1000) 6916 6933 myCobyla.setMaximumAbsoluteError(1.0e-10) branches/chaos/doc/src/UserManual/Distribution_UserManual.tex
r883 r980 2009 2009 \item[Some methods :] \strut 2010 2010 \begin{description} 2011 \item $ getNormalCorrelationFromKendallCorrelation$2012 \begin{description} 2013 \item[Usage :] $Norma lCopulagetNormalCorrelationFromKendallCorrelation(K)$2011 \item $GetNormalCorrelationFromKendallCorrelation$ 2012 \begin{description} 2013 \item[Usage :] $NormaCopula.GetNormalCorrelationFromKendallCorrelation(K)$ 2014 2014 \item[Arguments :] $K$ : a CorrelationMatrix, it must be the Kendall correlation matrix of the considered random vector 2015 2015 \item[Value :] a CorrelationMatrix, the correlation matrix of the normal copula evaluated from the Kendall correlation matrix $K$ … … 2017 2017 \bigskip 2018 2018 2019 \item $ getNormalCorrelationFromSpearmanCorrelation$2020 \begin{description} 2021 \item[Usage :] $NormalCopula. getNormalCorrelationFromSpearmanCorrelation(S)$2019 \item $GetNormalCorrelationFromSpearmanCorrelation$ 2020 \begin{description} 2021 \item[Usage :] $NormalCopula.GetNormalCorrelationFromSpearmanCorrelation(S)$ 2022 2022 \item[Arguments :]$S$ : a CorrelationMatrix, it must be the Spearman correlation matrix of the considered random vector 2023 2023 \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 87 87 \item[Usage :] $getBoundingBox()$ 88 88 \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})$. 90 90 \end{description} 91 91 \bigskip … … 202 202 \item[Usage :] $getBoundingBox()$ 203 203 \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})$. 205 205 \end{description} 206 206 \bigskip branches/chaos/lib/m4/Makefile.am
r968 r980 46 46 examplesdir = $(pkgdatadir)/examples 47 47 examplesM4dir = $(pkgdatadir)/examples/m4 48 49 dataFiles = examples/Makefile.am 50 dataFiles += examples/bootstrap 51 dataFiles += examples/README 52 dataFiles += examples/AUTHORS 53 m4Files = examples/m4/ot_check_boost.m4 54 m4Files += examples/m4/ot_check_openturns.m4 55 m4Files += examples/m4/ot_check_qt.m4 56 m4Files += examples/m4/bnv_have_qt.m4 57 48 58 examples_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 59 examples_DATA += $(dataFiles) 60 examplesM4_DATA = $(m4Files) 61 62 EXTRA_DIST += examples/configure.ac.in 63 EXTRA_DIST += $(dataFiles) 64 EXTRA_DIST += $(m4Files) 57 65 58 66 install-data-hook: 59 67 -( cd $(examplesdir) && chmod +x bootstrap && ./bootstrap ) 68 69 uninstall-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 60 80 61 81 examples/configure.ac : configure-stamp-h … … 63 83 (cd $(top_builddir) && CONFIG_FILES=m4/examples/configure.ac ./config.status) 64 84 echo > $@ 85 86 DISTCLEANFILES = configure-stamp-h branches/chaos/lib/src/Base/Common/Makefile.am
r954 r980 48 48 StorageManager.hxx \ 49 49 XMLStorageManager.hxx \ 50 WrapperFile.hxx \51 WrapperData.hxx \52 50 WrapperInterface.h \ 53 51 Path.hxx \ … … 90 88 StorageManager.cxx \ 91 89 XMLStorageManager.cxx \ 92 WrapperFile.cxx \93 WrapperData.cxx \94 90 Path.cxx \ 95 91 ComparisonOperator.cxx \ … … 124 120 125 121 126 127 if WITH_XERCESC128 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.cxx133 otinclude_HEADERS += \134 XMLStringConverter.hxx \135 StringXMLConverter.hxx \136 XMLWrapperErrorHandler.hxx \137 XMLTags.hxx138 endifbranches/chaos/lib/src/Base/Func/ComputedNumericalMathEvaluationImplementation.hxx
r862 r980 50 50 51 51 /* Some typedefs to ease reading */ 52 typedef Common::WrapperFile WrapperFile;53 52 typedef Common::WrapperInternalException WrapperInternalException; 54 53 typedef NumericalMathEvaluationImplementation::InvalidArgumentException InvalidArgumentException; branches/chaos/lib/src/Base/Func/ComputedNumericalMathEvaluationImplementationFactory.cxx
r954 r980 79 79 80 80 try { 81 // Find the path of the wrapper file that describes the numerical82 // math function interface83 wrapperPath = Common::WrapperFile::FindWrapperPathByName( functionName );84 85 #ifdef DEBUG86 Log::Debug(OSS() << "Successful search of wrapper file located at " << wrapperPath);87 #endif88 81 // Open the wrapper file and get the name of the library and the names of 89 82 // the function, its gradient and its hessian if defined … … 91 84 // Then create the actual functions 92 85 // 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 94 90 95 91 implementation = new ComputedNumericalMathEvaluationImplementation( functionName, wrapperFile ); branches/chaos/lib/src/Base/Func/ComputedNumericalMathGradientImplementation.hxx
r862 r980 58 58 59 59 /* Some typedefs to ease reading */ 60 typedef Common::WrapperFile WrapperFile; 61 typedef Common::WrapperInternalException WrapperInternalException; 60 typedef Common::WrapperInternalException WrapperInternalException; 62 61 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; 67 66 68 67 /** Default constructor */ branches/chaos/lib/src/Base/Func/ComputedNumericalMathGradientImplementationFactory.cxx
r954 r980 87 87 88 88 try { 89 // Find the path of the wrapper file that describes the numerical90 // math function interface91 wrapperPath = OT::Base::Common::WrapperFile::FindWrapperPathByName( functionName );92 93 #ifdef DEBUG94 Log::Debug( OSS() << "Successful search of wrapper file located at " << wrapperPath );95 #endif96 89 // Open the wrapper file and get the name of the library and the names of 97 90 // the function, its gradient and its hessian if defined … … 99 92 // Then create the actual functions 100 93 // 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 102 98 103 99 implementation = new ComputedNumericalMathGradientImplementation( functionName, wrapperFile ); branches/chaos/lib/src/Base/Func/ComputedNumericalMathHessianImplementation.hxx
r862 r980 58 58 59 59 /* Some typedefs to ease reading */ 60 typedef Common::WrapperFile WrapperFile; 61 typedef Common::WrapperInternalException WrapperInternalException; 60 typedef Common::WrapperInternalException WrapperInternalException; 62 61 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; 67 66 68 67 /** Default constructor */ branches/chaos/lib/src/Base/Func/ComputedNumericalMathHessianImplementationFactory.cxx
r954 r980 87 87 88 88 try { 89 // Find the path of the wrapper file that describes the numerical90 // math function interface91 wrapperPath = OT::Base::Common::WrapperFile::FindWrapperPathByName( functionName );92 93 #ifdef DEBUG94 Log::Debug( OSS() << "Successful search of wrapper file located at " << wrapperPath );95 #endif96 89 // Open the wrapper file and get the name of the library and the names of 97 90 // the function, its gradient and its hessian if defined … … 99 92 // Then create the actual functions 100 93 // 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 102 98 103 99 implementation = new ComputedNumericalMathHessianImplementation( functionName, wrapperFile ); branches/chaos/lib/src/Base/Func/Makefile.am
r954 r980 38 38 Library.hxx \ 39 39 LibraryLoader.hxx \ 40 WrapperData.hxx \ 41 WrapperFile.hxx \ 40 42 WrapperObject.hxx \ 41 43 NumericalMathFunction.hxx \ … … 86 88 Library.cxx \ 87 89 LibraryLoader.cxx \ 90 WrapperData.cxx \ 91 WrapperFile.cxx \ 88 92 WrapperObject.cxx \ 89 93 NumericalMathFunction.cxx \ … … 128 132 129 133 libOTFunc_la_LIBADD = $(builddir)/MuParser/libOTMuParser.la 134 135 136 if WITH_XERCESC 137 AM_CPPFLAGS += -I@xercesc_include_path@ 138 libOTFunc_la_LDFLAGS += -L@xercesc_lib_path@ 139 libOTFunc_la_LIBADD += -l@xercesc_lib_name@ 140 libOTFunc_la_SOURCES += \ 141 XMLWrapperErrorHandler.cxx 142 otinclude_HEADERS += \ 143 XMLStringConverter.hxx \ 144 StringXMLConverter.hxx \ 145 XMLWrapperErrorHandler.hxx \ 146 XMLTags.hxx 147 endif branches/chaos/lib/src/Base/Func/NumericalMathFunction.cxx
r954 r980 132 132 } 133 133 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 134 141 /* Comparison operator */ 135 142 Bool NumericalMathFunction::operator ==(const NumericalMathFunction & other) const branches/chaos/lib/src/Base/Func/NumericalMathFunction.hxx
r954 r980 119 119 #endif 120 120 121 /** Constructor from a wrapper file */ 122 NumericalMathFunction(const WrapperFile & wrapperFile); 123 121 124 /** Comparison operator */ 122 125 Bool operator ==(const NumericalMathFunction & other) const; branches/chaos/lib/src/Base/Func/NumericalMathFunctionImplementation.cxx
r954 r980 37 37 #include "CenteredFiniteDifferenceHessian.hxx" 38 38 #include "PersistentObjectFactory.hxx" 39 #include "WrapperFile.hxx"40 39 #include "Log.hxx" 41 40 #include "OSS.hxx" … … 74 73 } 75 74 76 /* Default constructor*/75 /* Constructor from a wrapper name */ 77 76 NumericalMathFunctionImplementation::NumericalMathFunctionImplementation(const String & name) 78 77 : PersistentObject(name), … … 84 83 p_initialHessianImplementation_(p_hessianImplementation_) 85 84 { 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 102 112 ComputedNumericalMathEvaluationImplementation * implementation = new ComputedNumericalMathEvaluationImplementation( name, wrapperFile ); 103 113 p_evaluationImplementation_.reset(implementation); … … 117 127 p_hessianImplementation_.reset(new CenteredFiniteDifferenceHessian(sqrt(CenteredFiniteDifferenceHessian::DefaultEpsilon), p_evaluationImplementation_)); 118 128 } 119 120 } 129 } 130 121 131 122 132 /* Analytical formula constructor */ branches/chaos/lib/src/Base/Func/NumericalMathFunctionImplementation.hxx
r954 r980 38 38 #include "NumericalMathHessianImplementation.hxx" 39 39 #include "Description.hxx" 40 #include "WrapperFile.hxx" 40 41 41 42 namespace OpenTURNS { … … 107 108 NumericalMathFunctionImplementation(); 108 109 109 /** Default constructor*/110 /** Constructor from a wrapper name */ 110 111 NumericalMathFunctionImplementation(const String & name); 112 113 /** Constructor from a wrapper file */ 114 NumericalMathFunctionImplementation(const WrapperFile & wrapperFile); 111 115 112 116 /** Analytical formula constructor */ … … 249 253 void setInitialHessianImplementation(const HessianImplementation & p_initialHessianImplementation); 250 254 255 /* This method set the implementations with the values listed in the wrapper file */ 256 void initImplementations(const WrapperFile & wrapperFile); 257 251 258 private: 252 259 /* A pointer on the actual numerical math function implementation */ branches/chaos/lib/src/Base/Func/WrapperObject.cxx
r968 r980 260 260 261 261 /* Data accessor */ 262 const Common::WrapperData & WrapperObject::getWrapperData() const262 const WrapperData & WrapperObject::getWrapperData() const 263 263 { 264 264 return data_; … … 288 288 Description description; 289 289 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_); 291 291 return description; 292 292 } branches/chaos/lib/src/Base/Func/WrapperObject.hxx
r954 r980 65 65 typedef Common::WrapperInternalException WrapperInternalException; 66 66 typedef Common::InvalidArgumentException InvalidArgumentException; 67 typedef Common::WrapperData WrapperData;68 67 typedef Type::NumericalPoint NumericalPoint; 69 68 typedef Stat::NumericalSample NumericalSample; … … 151 150 /** Data accessor */ 152 151 void setWrapperData(const WrapperData & data); 153 const Common::WrapperData & getWrapperData() const;152 const WrapperData & getWrapperData() const; 154 153 155 154 branches/chaos/lib/test/t_Waarts_25_quadratic_terms.cxx
- Property svn:executable deleted
branches/chaos/python/src/Makefile.am
r954 r980 62 62 Object.i \ 63 63 PersistentObject.i \ 64 Pointer.i \65 InterfaceObject.i \66 TypedInterfaceObject.i \67 TypedCollectionInterfaceObject.i \68 64 Study.i \ 69 65 StorageManager.i \ … … 81 77 BoostPointerImplementation.i \ 82 78 PlatformInfo.i \ 79 Pointer.i \ 80 InterfaceObject.i \ 81 TypedInterfaceObject.i \ 82 TypedCollectionInterfaceObject.i \ 83 83 Collection.i \ 84 84 PersistentCollection.i \ … … 139 139 Pie.i \ 140 140 Staircase.i \ 141 WrapperData.i \ 142 WrapperFile.i \ 141 143 NumericalMathEvaluationImplementation.i \ 142 144 NumericalMathGradientImplementation.i \ … … 394 396 # RandomGenerator.hxx \ 395 397 # CorrelationAnalysis.hxx \ 398 # WrapperData.hxx \ 399 # WrapperFile.hxx \
