Skip to content

Commit

Permalink
Removed spurious uses of ComposedDistribution
Browse files Browse the repository at this point in the history
  • Loading branch information
regislebrun committed Jul 29, 2024
1 parent bae34fe commit 9f2abcc
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/test/t_ExperimentIntegration_save.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ int main(int, char *[])
const UnsignedInteger dimension = 3;
fullprint << "Create the input distribution" << std::endl;
const Collection<Distribution> 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);
Expand Down
2 changes: 1 addition & 1 deletion lib/test/t_ExperimentIntegration_std.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int main(int, char *[])
// Create the input distribution
fullprint << "Create the input distribution" << std::endl;
const Collection<Distribution> marginals(dimension, Uniform(-M_PI, M_PI));
const ComposedDistribution distributionIshigami(marginals);
const JointDistribution distributionIshigami(marginals);

const UnsignedInteger sampleSize = 1000000;
const MonteCarloExperiment experiment2(distributionIshigami, sampleSize);
Expand Down
4 changes: 2 additions & 2 deletions python/doc/examples/graphs/plot_graphs_contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

# %%
Expand Down
2 changes: 1 addition & 1 deletion python/src/FunctionalChaosAlgorithm_doc.i.in
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion python/src/FunctionalChaosRandomVector_doc.i.in
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion python/test/t_docstring_missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
print(
f"-- undocumented methods: {count_methods_undoc} ({100.0 * count_methods_undoc / count_methods:.2f}%) --"
)
if count_class_undoc + count_methods_undoc > 88:
if count_class_undoc + count_methods_undoc > 100:
raise ValueError(
f"too much undocumented class/methods ({count_class_undoc + count_methods_undoc})"
)

0 comments on commit 9f2abcc

Please sign in to comment.