From c729f81b46e74da6ed348a0439fdff4988a0c96e Mon Sep 17 00:00:00 2001 From: regislebrun Date: Sun, 30 Jun 2024 18:06:56 +0200 Subject: [PATCH] Removed spurious uses of ComposedDistribution --- lib/test/t_ExperimentIntegration_save.cxx | 2 +- lib/test/t_ExperimentIntegration_std.cxx | 2 +- python/doc/examples/graphs/plot_graphs_contour.py | 4 ++-- python/src/FunctionalChaosAlgorithm_doc.i.in | 2 +- python/src/FunctionalChaosRandomVector_doc.i.in | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/test/t_ExperimentIntegration_save.cxx b/lib/test/t_ExperimentIntegration_save.cxx index ff2baec1824..0195bccbde5 100644 --- a/lib/test/t_ExperimentIntegration_save.cxx +++ b/lib/test/t_ExperimentIntegration_save.cxx @@ -34,7 +34,7 @@ int main(int, char *[]) const UnsignedInteger dimension = 3; fullprint << "Create the input distribution" << std::endl; const Collection marginals(dimension, Uniform(-M_PI, M_PI)); - const ComposedDistribution distributionIshigami(marginals); + const JointDistribution distributionIshigami(marginals); const UnsignedInteger sampleSize = 100; const MonteCarloExperiment experiment2(distributionIshigami, sampleSize); const ExperimentIntegration integration(experiment2); diff --git a/lib/test/t_ExperimentIntegration_std.cxx b/lib/test/t_ExperimentIntegration_std.cxx index 58b350e87a5..f8b33f1a8f9 100644 --- a/lib/test/t_ExperimentIntegration_std.cxx +++ b/lib/test/t_ExperimentIntegration_std.cxx @@ -52,7 +52,7 @@ int main(int, char *[]) // Create the input distribution fullprint << "Create the input distribution" << std::endl; const Collection marginals(dimension, Uniform(-M_PI, M_PI)); - const ComposedDistribution distributionIshigami(marginals); + const JointDistribution distributionIshigami(marginals); const UnsignedInteger sampleSize = 1000000; const MonteCarloExperiment experiment2(distributionIshigami, sampleSize); diff --git a/python/doc/examples/graphs/plot_graphs_contour.py b/python/doc/examples/graphs/plot_graphs_contour.py index 5f9fc050717..bf4be8c005d 100644 --- a/python/doc/examples/graphs/plot_graphs_contour.py +++ b/python/doc/examples/graphs/plot_graphs_contour.py @@ -122,11 +122,11 @@ copula = ot.NormalCopula(corr) x1 = ot.Normal(-1.0, 1) x2 = ot.Normal(2, 1) -x_funk = ot.ComposedDistribution([x1, x2], copula) +x_funk = ot.JointDistribution([x1, x2], copula) x1 = ot.Normal(1.0, 1) x2 = ot.Normal(-2, 1) -x_punk = ot.ComposedDistribution([x1, x2], copula) +x_punk = ot.JointDistribution([x1, x2], copula) mixture = ot.Mixture([x_funk, x_punk], [0.5, 1.0]) # %% diff --git a/python/src/FunctionalChaosAlgorithm_doc.i.in b/python/src/FunctionalChaosAlgorithm_doc.i.in index 2e3b30e3397..ac13aa89adb 100644 --- a/python/src/FunctionalChaosAlgorithm_doc.i.in +++ b/python/src/FunctionalChaosAlgorithm_doc.i.in @@ -90,7 +90,7 @@ Create the model: >>> ot.RandomGenerator.SetSeed(0) >>> inputDimension = 1 >>> model = ot.SymbolicFunction(['x'], ['x * sin(x)']) ->>> distribution = ot.ComposedDistribution([ot.Uniform()] * inputDimension) +>>> distribution = ot.JointDistribution([ot.Uniform()] * inputDimension) Build the multivariate orthonormal basis: diff --git a/python/src/FunctionalChaosRandomVector_doc.i.in b/python/src/FunctionalChaosRandomVector_doc.i.in index 2ada84ca74c..286566ae3f8 100644 --- a/python/src/FunctionalChaosRandomVector_doc.i.in +++ b/python/src/FunctionalChaosRandomVector_doc.i.in @@ -59,7 +59,7 @@ First, we create the PCE. >>> ot.RandomGenerator.SetSeed(0) >>> inputDimension = 1 >>> model = ot.SymbolicFunction(['x'], ['x * sin(x)']) ->>> distribution = ot.ComposedDistribution([ot.Uniform()] * inputDimension) +>>> distribution = ot.JointDistribution([ot.Uniform()] * inputDimension) >>> polyColl = [0.0] * inputDimension >>> for i in range(distribution.getDimension()): ... polyColl[i] = ot.StandardDistributionPolynomialFactory(distribution.getMarginal(i))