Changeset 1010
- Timestamp:
- 11/14/08 12:56:39 (2 months ago)
- Files:
-
- branches/lebrun/devel/lib/src/Base/Func/MethodBoundNumericalMathEvaluationImplementation.hxx (modified) (2 diffs)
- branches/lebrun/devel/lib/src/Base/Func/WrapperData.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/src/Base/Func/WrapperFile.cxx (modified) (3 diffs)
- branches/lebrun/devel/lib/src/Base/Func/WrapperFile.hxx (modified) (1 diff)
- branches/lebrun/devel/lib/src/Base/Graph/Contour.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/src/Base/Graph/DrawableImplementation.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/src/Uncertainty/Distribution/ExtraFunc/dcdflib.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/src/Uncertainty/Distribution/Normal.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/test/check_testsuite.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/external_code_threads.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_ClaytonCopulaFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_FrankCopulaFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_GumbelCopulaFactory_std.at (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_MethodBoundNumericalMathEvaluationImplementation_std.at (modified) (2 diffs)
- branches/lebrun/devel/lib/test/t_MethodBoundNumericalMathEvaluationImplementation_std.cxx (modified) (1 diff)
- branches/lebrun/devel/lib/test/t_NumericalSample_computation.at (modified) (1 diff)
- branches/lebrun/devel/python/test/t_ClaytonCopulaFactory_std.atpy (modified) (1 diff)
- branches/lebrun/devel/python/test/t_FrankCopulaFactory_std.atpy (modified) (1 diff)
- branches/lebrun/devel/python/test/t_GumbelCopulaFactory_std.atpy (modified) (1 diff)
- branches/lebrun/devel/python/test/t_NumericalSample_computation.atpy (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/lebrun/devel/lib/src/Base/Func/MethodBoundNumericalMathEvaluationImplementation.hxx
r962 r1010 20 20 21 21 #include "NumericalMathEvaluationImplementation.hxx" 22 #include "NumericalMathFunctionImplementation.hxx" 22 23 #include "NumericalPoint.hxx" 23 24 … … 186 187 187 188 template <typename EvaluableObject, typename ReturnType_, typename ArgumentType_> 188 MethodBoundNumericalMathEvaluationImplementation<EvaluableObject, ReturnType_, ArgumentType_> *189 NumericalMathFunctionImplementation 189 190 bindMethod (const EvaluableObject & obj, 190 191 typename MethodBoundNumericalMathEvaluationImplementation<EvaluableObject, ReturnType_, ArgumentType_>::EvaluationMethod method ) 191 192 { 192 return new MethodBoundNumericalMathEvaluationImplementation<EvaluableObject, ReturnType_, ArgumentType_>( obj, method);193 return NumericalMathFunctionImplementation( new MethodBoundNumericalMathEvaluationImplementation<EvaluableObject, ReturnType_, ArgumentType_>( obj, method ) ); 193 194 } 194 195 branches/lebrun/devel/lib/src/Base/Func/WrapperData.cxx
r991 r1010 126 126 { 127 127 OSS oss; 128 oss << "state=" << WrapperConfigurationStateAsString[state_] 129 << " mode=" << WrapperConfigurationModeAsString[mode_] 130 << " in=" << WrapperDataTransferModeAsString[in_] 131 << " out=" << WrapperDataTransferModeAsString[out_]; 128 oss << "state=" << WrapperConfigurationStateAsString[state_] 129 << " mode=" << WrapperConfigurationModeAsString[mode_] 130 << " in=" << WrapperDataTransferModeAsString[in_] 131 << " out=" << WrapperDataTransferModeAsString[out_] 132 << " command=" << command_; 132 133 return oss; 133 134 } branches/lebrun/devel/lib/src/Base/Func/WrapperFile.cxx
r1004 r1010 71 71 CLASSNAMEINIT(WrapperFile); 72 72 73 /* 74 * Default constructor 75 */ 73 /* Default constructor */ 74 WrapperFile::WrapperFile() 75 : PersistentObject(), 76 descriptionFilePath_(), 77 data_() 78 { 79 // Nothing to do 80 } 81 82 /* Constructor from file */ 76 83 WrapperFile::WrapperFile(const FileName & pathToFile) 77 84 throw(WrapperFileParsingException) … … 97 104 OSS oss; 98 105 oss << "class=" << getClassName() 99 << " name=" << getName()106 << " path=" << getDescriptionFilePath() 100 107 << " data={" << data_ 101 108 << "}"; … … 542 549 // Write out the document to a file 543 550 doc.save( pathToFile ); 544 } 551 552 setDescriptionFilePath( pathToFile ); 553 } 545 554 546 555 #else branches/lebrun/devel/lib/src/Base/Func/WrapperFile.hxx
r1004 r1010 78 78 public: 79 79 80 /** 81 * Default constructor 82 */ 80 /** Default constructor */ 81 WrapperFile(); 82 83 /** Constructor from file */ 83 84 explicit WrapperFile(const FileName & pathToFile) 84 85 throw(WrapperFileParsingException); branches/lebrun/devel/lib/src/Base/Graph/Contour.cxx
r934 r1010 24 24 * Id: $Id$ 25 25 */ 26 #include <cstdio> 26 27 #include "Contour.hxx" 27 28 #include "PersistentObjectFactory.hxx" branches/lebrun/devel/lib/src/Base/Graph/DrawableImplementation.cxx
r823 r1010 26 26 27 27 #include <algorithm> 28 #include <cstdio> 28 29 #include <cstdlib> 29 30 #include "DrawableImplementation.hxx" branches/lebrun/devel/lib/src/Uncertainty/Distribution/ExtraFunc/dcdflib.cxx
r867 r1010 28 28 # include <cmath> 29 29 # include <ctime> 30 # include <cstdio> 30 31 # include <cstdlib> 31 32 branches/lebrun/devel/lib/src/Uncertainty/Distribution/Normal.cxx
r975 r1010 343 343 { 344 344 lowerCDF = 0.0; 345 if (finiteLower[ 0]) lowerCDF = DistFunc::pNormal(lower[0]);345 if (finiteLower[i]) lowerCDF = DistFunc::pNormal(lower[i]); 346 346 upperCDF = 1.0; 347 if (finiteUpper[ 0]) upperCDF = DistFunc::pNormal(upper[0]);347 if (finiteUpper[i]) upperCDF = DistFunc::pNormal(upper[i]); 348 348 value *= upperCDF - lowerCDF; 349 349 } branches/lebrun/devel/lib/test/check_testsuite.at
r999 r1010 65 65 m4_include(t_LinearNumericalMathFunction_std.at) 66 66 m4_include(t_ConstantNumericalMathHessianImplementation_std.at) 67 #m4_include(t_MethodBoundNumericalMathEvaluationImplementation_std.at)67 m4_include(t_MethodBoundNumericalMathEvaluationImplementation_std.at) 68 68 m4_include(t_NumericalMathFunction_analytical.at) 69 69 branches/lebrun/devel/lib/test/external_code_threads.cxx
r867 r1010 26 26 #include <iostream> 27 27 #include <cmath> 28 #include <cstdio> 28 29 #include <cstdlib> 29 30 #include "OT.hxx" branches/lebrun/devel/lib/test/t_ClaytonCopulaFactory_std.at
r994 r1010 8 8 [0], 9 9 [[Distribution =class=ClaytonCopula name=ClaytonCopula dimension=2 theta=1.5 10 Estimated distribution=class=ClaytonCopula name=ClaytonCopula dimension=2 theta=1.33 37610 Estimated distribution=class=ClaytonCopula name=ClaytonCopula dimension=2 theta=1.33821 11 11 ]], 12 12 [ignore]) branches/lebrun/devel/lib/test/t_FrankCopulaFactory_std.at
r994 r1010 8 8 [0], 9 9 [[Distribution =class=FrankCopula name=FrankCopula dimension=2 theta=1.5 10 Estimated distribution=class=FrankCopula name=FrankCopula dimension=2 theta=1.31 50410 Estimated distribution=class=FrankCopula name=FrankCopula dimension=2 theta=1.31776 11 11 ]], 12 12 [ignore]) branches/lebrun/devel/lib/test/t_GumbelCopulaFactory_std.at
r994 r1010 8 8 [0], 9 9 [[Distribution =class=GumbelCopula name=GumbelCopula dimension=2 theta=1.5 10 Estimated distribution=class=GumbelCopula name=GumbelCopula dimension=2 theta=1.55 74510 Estimated distribution=class=GumbelCopula name=GumbelCopula dimension=2 theta=1.55919 11 11 ]], 12 12 [ignore]) branches/lebrun/devel/lib/test/t_MethodBoundNumericalMathEvaluationImplementation_std.at
r962 r1010 1 AT_SETUP([MethodBoundNumericalMathEval uationImplementation])1 AT_SETUP([MethodBoundNumericalMathEval...Implementation]) 2 2 3 3 AT_KEYWORDS([std Uncertainty Normal MethodBoundNumericalMathEvaluationImplementation]) … … 5 5 AT_CHECK([t_MethodBoundNumericalMathEvaluationImplementation_std], 6 6 [0], 7 [[]], 7 [[Normal DDF=class=NumericalPoint name=Unnamed dimension=1 implementation=class=NumericalPointImplementation name=Unnamed dimension=1 values=[-0.241971] 8 bind DDF =-0.241971 9 ]], 8 10 [ignore]) 9 11 branches/lebrun/devel/lib/test/t_MethodBoundNumericalMathEvaluationImplementation_std.cxx
r962 r1010 47 47 try { 48 48 Normal distribution(0, 1.0); 49 // NumericalMathFunction function(bindMethod<Normal, NumericalScalar, NumericalPoint>(distribution, &Normal::computeCDF));49 NumericalMathFunction function( bindMethod <Normal, NumericalScalar, NumericalScalar> ( distribution, &Normal::computeDDF ) ); 50 50 NumericalPoint p(1, 1.0); 51 std::cout << "Normal CDF=" << distribution.computeCDF(p) << std::endl;52 // std::cout << "bind CDF =" << function(p)[0] << std::endl;51 std::cout << "Normal DDF=" << distribution.computeDDF(p) << std::endl; 52 std::cout << "bind DDF =" << function(p)[0] << std::endl; 53 53 } 54 54 catch (TestFailed & ex) { branches/lebrun/devel/lib/test/t_NumericalSample_computation.at
r823 r1010 16 16 Pearson correlation=class=CorrelationMatrix dimension=3 implementation=class=MatrixImplementation name=Unnamed rows=3 columns=3 values=[1,0.65588,-0.57565,0.65588,1,-0.987458,-0.57565,-0.987458,1] 17 17 Spearman correlation=class=CorrelationMatrix dimension=3 implementation=class=MatrixImplementation name=Unnamed rows=3 columns=3 values=[1,0.8,-0.8,0.8,1,-1,-0.8,-1,1] 18 Kendall tau=class=CorrelationMatrix dimension=3 implementation=class=MatrixImplementation name=Unnamed rows=3 columns=3 values=[1,0. 4,-0.4,0.4,1,-0.6,-0.4,-0.6,1]18 Kendall tau=class=CorrelationMatrix dimension=3 implementation=class=MatrixImplementation name=Unnamed rows=3 columns=3 values=[1,0.666667,-0.666667,0.666667,1,-1,-0.666667,-1,1] 19 19 range per component=class=NumericalPoint name=Unnamed dimension=3 implementation=class=NumericalPointImplementation name=Unnamed dimension=3 values=[5,7,7] 20 20 median per component=class=NumericalPoint name=Unnamed dimension=3 implementation=class=NumericalPointImplementation name=Unnamed dimension=3 values=[5,3,8] branches/lebrun/devel/python/test/t_ClaytonCopulaFactory_std.atpy
r994 r1010 8 8 [0], 9 9 [[distribution= class=ClaytonCopula name=ClaytonCopula dimension=2 theta=1.5 10 Estimated distribution= class=ClaytonCopula name=ClaytonCopula dimension=2 theta=1.33 37610 Estimated distribution= class=ClaytonCopula name=ClaytonCopula dimension=2 theta=1.33821 11 11 ]], 12 12 [ignore]) branches/lebrun/devel/python/test/t_FrankCopulaFactory_std.atpy
r994 r1010 6 6 [0], 7 7 [[distribution= class=FrankCopula name=FrankCopula dimension=2 theta=1.5 8 Estimated distribution= class=FrankCopula name=FrankCopula dimension=2 theta=1.31 5048 Estimated distribution= class=FrankCopula name=FrankCopula dimension=2 theta=1.31776 9 9 ]], 10 10 [ignore]) branches/lebrun/devel/python/test/t_GumbelCopulaFactory_std.atpy
r994 r1010 6 6 [0], 7 7 [[distribution= class=GumbelCopula name=GumbelCopula dimension=2 theta=1.5 8 Estimated distribution= class=GumbelCopula name=GumbelCopula dimension=2 theta=1.55 7458 Estimated distribution= class=GumbelCopula name=GumbelCopula dimension=2 theta=1.55919 9 9 ]], 10 10 [ignore]) branches/lebrun/devel/python/test/t_NumericalSample_computation.atpy
r867 r1010 16 16 Pearson correlation= class=CorrelationMatrix dimension=3 implementation=class=MatrixImplementation name=Unnamed rows=3 columns=3 values=[1,0.65588,-0.57565,0.65588,1,-0.987458,-0.57565,-0.987458,1] 17 17 Spearman correlation= class=CorrelationMatrix dimension=3 implementation=class=MatrixImplementation name=Unnamed rows=3 columns=3 values=[1,0.8,-0.8,0.8,1,-1,-0.8,-1,1] 18 Kendall tau= class=CorrelationMatrix dimension=3 implementation=class=MatrixImplementation name=Unnamed rows=3 columns=3 values=[1,0. 4,-0.4,0.4,1,-0.6,-0.4,-0.6,1]18 Kendall tau= class=CorrelationMatrix dimension=3 implementation=class=MatrixImplementation name=Unnamed rows=3 columns=3 values=[1,0.666667,-0.666667,0.666667,1,-1,-0.666667,-1,1] 19 19 range per component= class=NumericalPoint name=Unnamed dimension=3 implementation=class=NumericalPointImplementation name=Unnamed dimension=3 values=[5,7,7] 20 20 median per component= class=NumericalPoint name=Unnamed dimension=3 implementation=class=NumericalPointImplementation name=Unnamed dimension=3 values=[5,3,8]
