--- myst: substitutions: macro: python: 1-5,15-48 cpp: 4-6,12-39 bloc1: python: 25-26 cpp: 18-19 bloc2: python: 29-30 cpp: 14,22-23 --- # Macro "**samplingQMC.{{extension}}**" ## Objective Generate a {{doe}} of 100 patterns using **quasi Monte-Carlo** methods (**"Halton"** or **"Sobol"**) with 12 random attributes, following an uniform law on [3.,2.]. All these information are introduced by variables which will be used by the rest of the macro. ## Macro {{uranie}} {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/sampler/use_cases/" + language + "/samplingQMC." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + macro[language] + "\n" + "```" }} Laws are set for each attribute and linked to a {{tds}}: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/sampler/use_cases/" + language + "/samplingQMC." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc1[language] + "\n" + "```" }} The sampling is generated with the QMC method and a correlation is set between the two first attributes: {{ "```{literalinclude} " + parent_dir + "/roottest/uranie/doc/sampler/use_cases/" + language + "/samplingQMC." + extension + "\n" + ":language: " + language + "\n" + ":lines: " + bloc2[language] + "\n" + "```" }} The rest of the code is used to produce a plot. ## Graph {{ "```{figure} " + parent_dir + "/roottest/build/uranie/doc/sampler/use_cases/" + language + "/qmc/samplingQMC.png\n" + ":align: center\n" + ":name: use_cases_samplingQMC\n" + figure_scale + "\n" + "\n" + "Graph of the macro **\"samplingQMC." + extension + "\"**" + "\n" + "```" }}