[#mp_units-discrete_distribution-08-2constructor-0b]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/discrete_distribution-08.adoc[discrete&lowbar;distribution]::discrete&lowbar;distribution
:relfileprefix: ../../
:mrdocs:

Construct from `initializer&lowbar;list`

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;random&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
discrete&lowbar;distribution(std::initializer&lowbar;list&lt;double&gt; weights);
----

== Parameters

[cols="1,4"]
|===
|Name|Description

| *weights*
| The object to construct from
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
