Files
libcomposition/docs/html/classfourdst_1_1composition_1_1_composition.html

2366 lines
169 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>fourdst::libcomposition: fourdst::composition::Composition Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">fourdst::libcomposition<span id="projectnumber">&#160;v2.0.1</span>
</div>
<div id="projectbrief">Robust atomic species information library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('classfourdst_1_1composition_1_1_composition.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classfourdst_1_1composition_1_1_composition-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">fourdst::composition::Composition Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Manages a collection of chemical species and their abundances.
<a href="#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="composition_8h_source.html">composition.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for fourdst::composition::Composition:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classfourdst_1_1composition_1_1_composition__inherit__graph.svg" width="155" height="126"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for fourdst::composition::Composition:</div>
<div class="dyncontent">
<div class="center"><div class="zoom"><iframe scrolling="no" frameborder="0" src="classfourdst_1_1composition_1_1_composition__coll__graph.svg" width="100%" height="474"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe></div></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfourdst_1_1composition_1_1_composition_1_1_composition_cache.html">CompositionCache</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Caches computed properties of the composition to avoid redundant calculations. <a href="structfourdst_1_1composition_1_1_composition_1_1_composition_cache.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a23b83b76ee025f6fc009184ee19bba88" id="r_a23b83b76ee025f6fc009184ee19bba88"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> ()=default</td></tr>
<tr class="memdesc:a23b83b76ee025f6fc009184ee19bba88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <br /></td></tr>
<tr class="separator:a23b83b76ee025f6fc009184ee19bba88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a08c1d1fe9384c5255a6ba40e34b18315" id="r_a08c1d1fe9384c5255a6ba40e34b18315"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a08c1d1fe9384c5255a6ba40e34b18315">~Composition</a> () override=default</td></tr>
<tr class="memdesc:a08c1d1fe9384c5255a6ba40e34b18315"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor. <br /></td></tr>
<tr class="separator:a08c1d1fe9384c5255a6ba40e34b18315"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3cc2099efd7db8eec3d9af2294b75fa" id="r_ae3cc2099efd7db8eec3d9af2294b75fa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae3cc2099efd7db8eec3d9af2294b75fa">Composition</a> (const std::vector&lt; std::string &gt; &amp;symbols)</td></tr>
<tr class="memdesc:ae3cc2099efd7db8eec3d9af2294b75fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given symbols from a vector. <br /></td></tr>
<tr class="separator:ae3cc2099efd7db8eec3d9af2294b75fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa95dddfa88a101ad6ce261295a4460c" id="r_afa95dddfa88a101ad6ce261295a4460c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afa95dddfa88a101ad6ce261295a4460c">Composition</a> (const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;species)</td></tr>
<tr class="memdesc:afa95dddfa88a101ad6ce261295a4460c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given species from a vector. <br /></td></tr>
<tr class="separator:afa95dddfa88a101ad6ce261295a4460c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d6fbe5c8142b358641bbe7ffde51053" id="r_a2d6fbe5c8142b358641bbe7ffde51053"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2d6fbe5c8142b358641bbe7ffde51053">Composition</a> (const std::set&lt; std::string &gt; &amp;symbols)</td></tr>
<tr class="memdesc:a2d6fbe5c8142b358641bbe7ffde51053"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given symbols from a set. <br /></td></tr>
<tr class="separator:a2d6fbe5c8142b358641bbe7ffde51053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d19fb3326e51c8fc8db5e0738e97d95" id="r_a7d19fb3326e51c8fc8db5e0738e97d95"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7d19fb3326e51c8fc8db5e0738e97d95">Composition</a> (const std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;species)</td></tr>
<tr class="memdesc:a7d19fb3326e51c8fc8db5e0738e97d95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given species from a set. <br /></td></tr>
<tr class="separator:a7d19fb3326e51c8fc8db5e0738e97d95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b3c93ce7c9473ac4aa4c9ee04f78051" id="r_a0b3c93ce7c9473ac4aa4c9ee04f78051"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0b3c93ce7c9473ac4aa4c9ee04f78051">Composition</a> (const std::vector&lt; std::string &gt; &amp;symbols, const std::vector&lt; double &gt; &amp;molarAbundances)</td></tr>
<tr class="memdesc:a0b3c93ce7c9473ac4aa4c9ee04f78051"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from symbols and their corresponding molar abundances. <br /></td></tr>
<tr class="separator:a0b3c93ce7c9473ac4aa4c9ee04f78051"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f0798b3f1191561b38f336406acf62a" id="r_a7f0798b3f1191561b38f336406acf62a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a7f0798b3f1191561b38f336406acf62a">Composition</a> (const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;species, const std::vector&lt; double &gt; &amp;molarAbundances)</td></tr>
<tr class="memdesc:a7f0798b3f1191561b38f336406acf62a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from species and their corresponding molar abundances. <br /></td></tr>
<tr class="separator:a7f0798b3f1191561b38f336406acf62a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6cdb28598267743f236d053cd5a62ae" id="r_ad6cdb28598267743f236d053cd5a62ae"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad6cdb28598267743f236d053cd5a62ae">Composition</a> (const std::set&lt; std::string &gt; &amp;symbols, const std::vector&lt; double &gt; &amp;molarAbundances)</td></tr>
<tr class="memdesc:ad6cdb28598267743f236d053cd5a62ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from symbols in a set and their corresponding molar abundances. <br /></td></tr>
<tr class="separator:ad6cdb28598267743f236d053cd5a62ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21369a80378d4c90438a34f0e4a275ca" id="r_a21369a80378d4c90438a34f0e4a275ca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a21369a80378d4c90438a34f0e4a275ca">Composition</a> (const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;composition)</td></tr>
<tr class="memdesc:a21369a80378d4c90438a34f0e4a275ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from another <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. <br /></td></tr>
<tr class="separator:a21369a80378d4c90438a34f0e4a275ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ec1e23cfecef764cb831171fed62fc2" id="r_a4ec1e23cfecef764cb831171fed62fc2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a4ec1e23cfecef764cb831171fed62fc2">operator=</a> (<a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> const &amp;other)</td></tr>
<tr class="memdesc:a4ec1e23cfecef764cb831171fed62fc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assignment operator. <br /></td></tr>
<tr class="separator:a4ec1e23cfecef764cb831171fed62fc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ab4dcda0bfd1a35b169bcc57fe66725" id="r_a3ab4dcda0bfd1a35b169bcc57fe66725"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3ab4dcda0bfd1a35b169bcc57fe66725">registerSymbol</a> (const std::string &amp;symbol)</td></tr>
<tr class="memdesc:a3ab4dcda0bfd1a35b169bcc57fe66725"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a new symbol for inclusion in the composition. <br /></td></tr>
<tr class="separator:a3ab4dcda0bfd1a35b169bcc57fe66725"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a156d1198ef47deed9689949f271969e2" id="r_a156d1198ef47deed9689949f271969e2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a156d1198ef47deed9689949f271969e2">registerSymbol</a> (const std::vector&lt; std::string &gt; &amp;symbols)</td></tr>
<tr class="memdesc:a156d1198ef47deed9689949f271969e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers multiple new symbols. <br /></td></tr>
<tr class="separator:a156d1198ef47deed9689949f271969e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a392a34c19f45d6c936cc7030e6cfaf3f" id="r_a392a34c19f45d6c936cc7030e6cfaf3f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a392a34c19f45d6c936cc7030e6cfaf3f">registerSpecies</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;species) noexcept</td></tr>
<tr class="memdesc:a392a34c19f45d6c936cc7030e6cfaf3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a new species by extracting its symbol. <br /></td></tr>
<tr class="separator:a392a34c19f45d6c936cc7030e6cfaf3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2846f4ea0d6075ecdaf4334741a54750" id="r_a2846f4ea0d6075ecdaf4334741a54750"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2846f4ea0d6075ecdaf4334741a54750">registerSpecies</a> (const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;species) noexcept</td></tr>
<tr class="memdesc:a2846f4ea0d6075ecdaf4334741a54750"><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers a vector of new species. <br /></td></tr>
<tr class="separator:a2846f4ea0d6075ecdaf4334741a54750"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a194f715788e7921bd611579440de2ecd" id="r_a194f715788e7921bd611579440de2ecd"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a194f715788e7921bd611579440de2ecd">contains</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;species) const noexcept override</td></tr>
<tr class="memdesc:a194f715788e7921bd611579440de2ecd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a given species is present in the composition. <br /></td></tr>
<tr class="separator:a194f715788e7921bd611579440de2ecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3bfb56a2587215a59894e76d4867ede" id="r_ac3bfb56a2587215a59894e76d4867ede"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac3bfb56a2587215a59894e76d4867ede">contains</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:ac3bfb56a2587215a59894e76d4867ede"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a given symbol is present in the composition. <br /></td></tr>
<tr class="separator:ac3bfb56a2587215a59894e76d4867ede"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d177d36b728442bcbd8cb66712c7c75" id="r_a9d177d36b728442bcbd8cb66712c7c75"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9d177d36b728442bcbd8cb66712c7c75">size</a> () const noexcept override</td></tr>
<tr class="memdesc:a9d177d36b728442bcbd8cb66712c7c75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of registered species in the composition. <br /></td></tr>
<tr class="separator:a9d177d36b728442bcbd8cb66712c7c75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a262d7133035d4e6f45daa81827abf5e7" id="r_a262d7133035d4e6f45daa81827abf5e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a262d7133035d4e6f45daa81827abf5e7">setMolarAbundance</a> (const std::string &amp;symbol, const double &amp;molar_abundance)</td></tr>
<tr class="memdesc:a262d7133035d4e6f45daa81827abf5e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the molar abundance for a given symbol. <br /></td></tr>
<tr class="separator:a262d7133035d4e6f45daa81827abf5e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac386709ef1e872fa558b8e30fc8b4c44" id="r_ac386709ef1e872fa558b8e30fc8b4c44"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac386709ef1e872fa558b8e30fc8b4c44">setMolarAbundance</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;species, const double &amp;molar_abundance)</td></tr>
<tr class="memdesc:ac386709ef1e872fa558b8e30fc8b4c44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the molar abundance for a given isotope. <br /></td></tr>
<tr class="separator:ac386709ef1e872fa558b8e30fc8b4c44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6baa22b92a78fd43d10d4941f30c8ac2" id="r_a6baa22b92a78fd43d10d4941f30c8ac2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6baa22b92a78fd43d10d4941f30c8ac2">setMolarAbundance</a> (const std::vector&lt; std::string &gt; &amp;symbols, const std::vector&lt; double &gt; &amp;molar_abundances)</td></tr>
<tr class="memdesc:a6baa22b92a78fd43d10d4941f30c8ac2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the molar abundances for a list of symbols. <br /></td></tr>
<tr class="separator:a6baa22b92a78fd43d10d4941f30c8ac2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae908cda3a994292e2eb767fa476b666b" id="r_ae908cda3a994292e2eb767fa476b666b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae908cda3a994292e2eb767fa476b666b">setMolarAbundance</a> (const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;species, const std::vector&lt; double &gt; &amp;molar_abundances)</td></tr>
<tr class="memdesc:ae908cda3a994292e2eb767fa476b666b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the molar abundances for a list of isotopes. <br /></td></tr>
<tr class="separator:ae908cda3a994292e2eb767fa476b666b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49b06737a50df9c25a234499a1431388" id="r_a49b06737a50df9c25a234499a1431388"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a49b06737a50df9c25a234499a1431388">setMolarAbundance</a> (const std::set&lt; std::string &gt; &amp;symbols, const std::vector&lt; double &gt; &amp;molar_abundances)</td></tr>
<tr class="memdesc:a49b06737a50df9c25a234499a1431388"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the molar abundances for a set of symbols. <br /></td></tr>
<tr class="separator:a49b06737a50df9c25a234499a1431388"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7af2f8f3050969a6c5b9a9ef5fead64" id="r_ad7af2f8f3050969a6c5b9a9ef5fead64"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad7af2f8f3050969a6c5b9a9ef5fead64">setMolarAbundance</a> (const std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;species, const std::vector&lt; double &gt; &amp;molar_abundances)</td></tr>
<tr class="memdesc:ad7af2f8f3050969a6c5b9a9ef5fead64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the molar abundances for a set of isotopes. <br /></td></tr>
<tr class="separator:ad7af2f8f3050969a6c5b9a9ef5fead64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ae885c28580ae15be8c16614bef3b0e" id="r_a3ae885c28580ae15be8c16614bef3b0e"><td class="memItemLeft" align="right" valign="top">std::set&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3ae885c28580ae15be8c16614bef3b0e">getRegisteredSymbols</a> () const noexcept override</td></tr>
<tr class="memdesc:a3ae885c28580ae15be8c16614bef3b0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the registered symbols. <br /></td></tr>
<tr class="separator:a3ae885c28580ae15be8c16614bef3b0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33db253ca50431b5166d43412ff18f71" id="r_a33db253ca50431b5166d43412ff18f71"><td class="memItemLeft" align="right" valign="top">const std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a33db253ca50431b5166d43412ff18f71">getRegisteredSpecies</a> () const noexcept override</td></tr>
<tr class="memdesc:a33db253ca50431b5166d43412ff18f71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a set of all species that are registered in the composition. <br /></td></tr>
<tr class="separator:a33db253ca50431b5166d43412ff18f71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ea2b673341fdc67afeb0f0517a54c8c" id="r_a9ea2b673341fdc67afeb0f0517a54c8c"><td class="memItemLeft" align="right" valign="top">std::unordered_map&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>, double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9ea2b673341fdc67afeb0f0517a54c8c">getMassFraction</a> () const noexcept override</td></tr>
<tr class="memdesc:a9ea2b673341fdc67afeb0f0517a54c8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the mass fractions of all species in the composition. <br /></td></tr>
<tr class="separator:a9ea2b673341fdc67afeb0f0517a54c8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5d8d21632fca2b35b0898f2b205cd10" id="r_ae5d8d21632fca2b35b0898f2b205cd10"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae5d8d21632fca2b35b0898f2b205cd10">getMassFraction</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:ae5d8d21632fca2b35b0898f2b205cd10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the mass fraction for a given symbol. See the overload for species-based lookup for more details on how mass fractions are calculated. <br /></td></tr>
<tr class="separator:ae5d8d21632fca2b35b0898f2b205cd10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8fe4e7158f8317bf29b5cd0c65a9524" id="r_ae8fe4e7158f8317bf29b5cd0c65a9524"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae8fe4e7158f8317bf29b5cd0c65a9524">getMassFraction</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:ae8fe4e7158f8317bf29b5cd0c65a9524"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the mass fraction for a given species. <br /></td></tr>
<tr class="separator:ae8fe4e7158f8317bf29b5cd0c65a9524"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34f71d4d8f0297c576fd62fabd490305" id="r_a34f71d4d8f0297c576fd62fabd490305"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a34f71d4d8f0297c576fd62fabd490305">getNumberFraction</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:a34f71d4d8f0297c576fd62fabd490305"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number fraction for a given symbol. See the overload for species-based lookup for more details on how number fractions are calculated. <br /></td></tr>
<tr class="separator:a34f71d4d8f0297c576fd62fabd490305"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1aa79993925f16ba3c30a376aa39161b" id="r_a1aa79993925f16ba3c30a376aa39161b"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1aa79993925f16ba3c30a376aa39161b">getNumberFraction</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:a1aa79993925f16ba3c30a376aa39161b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number fraction for a given species. <br /></td></tr>
<tr class="separator:a1aa79993925f16ba3c30a376aa39161b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f87ed64a1be9a6091c852131d24e476" id="r_a1f87ed64a1be9a6091c852131d24e476"><td class="memItemLeft" align="right" valign="top">std::unordered_map&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>, double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1f87ed64a1be9a6091c852131d24e476">getNumberFraction</a> () const noexcept override</td></tr>
<tr class="memdesc:a1f87ed64a1be9a6091c852131d24e476"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number fractions of all species in the composition. <br /></td></tr>
<tr class="separator:a1f87ed64a1be9a6091c852131d24e476"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add67a92d73e3a57a2bbdb52bc9ca3bfe" id="r_add67a92d73e3a57a2bbdb52bc9ca3bfe"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#add67a92d73e3a57a2bbdb52bc9ca3bfe">getMolarAbundance</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:add67a92d73e3a57a2bbdb52bc9ca3bfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the molar abundances of all species in the composition. <br /></td></tr>
<tr class="separator:add67a92d73e3a57a2bbdb52bc9ca3bfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78a43e9e77a9c1b0f27c50b9feb52449" id="r_a78a43e9e77a9c1b0f27c50b9feb52449"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a78a43e9e77a9c1b0f27c50b9feb52449">getMolarAbundance</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:a78a43e9e77a9c1b0f27c50b9feb52449"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the molar abundance for a given species. <br /></td></tr>
<tr class="separator:a78a43e9e77a9c1b0f27c50b9feb52449"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbbb5e51ad5ae5c0fa6bc0094195aecd" id="r_afbbb5e51ad5ae5c0fa6bc0094195aecd"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afbbb5e51ad5ae5c0fa6bc0094195aecd">getMeanParticleMass</a> () const noexcept override</td></tr>
<tr class="memdesc:afbbb5e51ad5ae5c0fa6bc0094195aecd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the mean particle mass of the composition. <br /></td></tr>
<tr class="separator:afbbb5e51ad5ae5c0fa6bc0094195aecd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90fc71d1fe03017ee4c7a1cac69d24fb" id="r_a90fc71d1fe03017ee4c7a1cac69d24fb"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a90fc71d1fe03017ee4c7a1cac69d24fb">getElectronAbundance</a> () const noexcept override</td></tr>
<tr class="memdesc:a90fc71d1fe03017ee4c7a1cac69d24fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the electron abundance of the composition. <br /></td></tr>
<tr class="separator:a90fc71d1fe03017ee4c7a1cac69d24fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac5b214a3d1278e127422224cb9cee50" id="r_aac5b214a3d1278e127422224cb9cee50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfourdst_1_1composition_1_1_canonical_composition.html">CanonicalComposition</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aac5b214a3d1278e127422224cb9cee50">getCanonicalComposition</a> () const</td></tr>
<tr class="memdesc:aac5b214a3d1278e127422224cb9cee50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the canonical composition (X, Y, Z) of the composition. <br /></td></tr>
<tr class="separator:aac5b214a3d1278e127422224cb9cee50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4f44aaf8b7e0d63872a70b5e2131369" id="r_af4f44aaf8b7e0d63872a70b5e2131369"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af4f44aaf8b7e0d63872a70b5e2131369">getMassFractionVector</a> () const noexcept override</td></tr>
<tr class="memdesc:af4f44aaf8b7e0d63872a70b5e2131369"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a uniform vector representation of the mass fraction stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. <br /></td></tr>
<tr class="separator:af4f44aaf8b7e0d63872a70b5e2131369"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4f72972cf4d1ff422d0790080e11473" id="r_ae4f72972cf4d1ff422d0790080e11473"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae4f72972cf4d1ff422d0790080e11473">getNumberFractionVector</a> () const noexcept override</td></tr>
<tr class="memdesc:ae4f72972cf4d1ff422d0790080e11473"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a uniform vector representation of the number fractions stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. <br /></td></tr>
<tr class="separator:ae4f72972cf4d1ff422d0790080e11473"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcb391f5fca2b636127e48e681e4c3ee" id="r_abcb391f5fca2b636127e48e681e4c3ee"><td class="memItemLeft" align="right" valign="top">std::vector&lt; double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abcb391f5fca2b636127e48e681e4c3ee">getMolarAbundanceVector</a> () const noexcept override</td></tr>
<tr class="memdesc:abcb391f5fca2b636127e48e681e4c3ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a uniform vector representation of the molar abundances stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. <br /></td></tr>
<tr class="separator:abcb391f5fca2b636127e48e681e4c3ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d94f62402bb90b5d12679faeaa8c5d7" id="r_a0d94f62402bb90b5d12679faeaa8c5d7"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0d94f62402bb90b5d12679faeaa8c5d7">getSpeciesIndex</a> (const std::string &amp;symbol) const override</td></tr>
<tr class="memdesc:a0d94f62402bb90b5d12679faeaa8c5d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the index in the sorted vector representation for a given symbol <br /></td></tr>
<tr class="separator:a0d94f62402bb90b5d12679faeaa8c5d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d220b42fa06d7d3a43944ee2b8f6a5f" id="r_a3d220b42fa06d7d3a43944ee2b8f6a5f"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3d220b42fa06d7d3a43944ee2b8f6a5f">getSpeciesIndex</a> (const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;species) const override</td></tr>
<tr class="memdesc:a3d220b42fa06d7d3a43944ee2b8f6a5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the index in the sorted vector representation for a given symbol <br /></td></tr>
<tr class="separator:a3d220b42fa06d7d3a43944ee2b8f6a5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4f854ded38f5e6fcd157a74a57cbf0c" id="r_ae4f854ded38f5e6fcd157a74a57cbf0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae4f854ded38f5e6fcd157a74a57cbf0c">getSpeciesAtIndex</a> (size_t index) const override</td></tr>
<tr class="memdesc:ae4f854ded38f5e6fcd157a74a57cbf0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the species at a given index in the sorted vector representation. <br /></td></tr>
<tr class="separator:ae4f854ded38f5e6fcd157a74a57cbf0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1701644ff1c83c220dc04eb58d1621b" id="r_ab1701644ff1c83c220dc04eb58d1621b"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab1701644ff1c83c220dc04eb58d1621b">begin</a> ()</td></tr>
<tr class="memdesc:ab1701644ff1c83c220dc04eb58d1621b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the beginning of the molar abundance map. <br /></td></tr>
<tr class="separator:ab1701644ff1c83c220dc04eb58d1621b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf41a833e8b704daf4f581fca5c8cb9b" id="r_adf41a833e8b704daf4f581fca5c8cb9b"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adf41a833e8b704daf4f581fca5c8cb9b">begin</a> () const</td></tr>
<tr class="memdesc:adf41a833e8b704daf4f581fca5c8cb9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a const iterator to the beginning of the molar abundance map. <br /></td></tr>
<tr class="separator:adf41a833e8b704daf4f581fca5c8cb9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adeaf6f1213e78cb1fe8a8317f0a8adc2" id="r_adeaf6f1213e78cb1fe8a8317f0a8adc2"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adeaf6f1213e78cb1fe8a8317f0a8adc2">end</a> ()</td></tr>
<tr class="memdesc:adeaf6f1213e78cb1fe8a8317f0a8adc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an iterator to the end of the molar abundance map. <br /></td></tr>
<tr class="separator:adeaf6f1213e78cb1fe8a8317f0a8adc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed2f5676f8f742199f01e4d1e9664bdd" id="r_aed2f5676f8f742199f01e4d1e9664bdd"><td class="memItemLeft" align="right" valign="top">auto&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aed2f5676f8f742199f01e4d1e9664bdd">end</a> () const</td></tr>
<tr class="memdesc:aed2f5676f8f742199f01e4d1e9664bdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a const iterator to the end of the molar abundance map. <br /></td></tr>
<tr class="separator:aed2f5676f8f742199f01e4d1e9664bdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_composition_abstract"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_methods_class_composition_abstract')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_composition_abstract.html">CompositionAbstract</a></td></tr>
<tr class="memitem:aaae3d6215b7433cb9871664852a95d1b inherit pub_methods_class_composition_abstract" id="r_aaae3d6215b7433cb9871664852a95d1b"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_composition_abstract.html#aaae3d6215b7433cb9871664852a95d1b">~CompositionAbstract</a> ()=default</td></tr>
<tr class="memdesc:aaae3d6215b7433cb9871664852a95d1b inherit pub_methods_class_composition_abstract"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor. <br /></td></tr>
<tr class="separator:aaae3d6215b7433cb9871664852a95d1b inherit pub_methods_class_composition_abstract"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-static-methods" name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:a46a706f9e4c06a45b45ae3dffdde5e9e" id="r_a46a706f9e4c06a45b45ae3dffdde5e9e"><td class="memItemLeft" align="right" valign="top">static quill::Logger *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a46a706f9e4c06a45b45ae3dffdde5e9e">getLogger</a> ()</td></tr>
<tr class="memdesc:a46a706f9e4c06a45b45ae3dffdde5e9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the logger instance for the <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> class. This is static to ensure that all composition objects share the same logger instance. <br /></td></tr>
<tr class="separator:a46a706f9e4c06a45b45ae3dffdde5e9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a452b0affb86dc971a96c80d01f4fcb2b" id="r_a452b0affb86dc971a96c80d01f4fcb2b"><td class="memItemLeft" align="right" valign="top">std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a452b0affb86dc971a96c80d01f4fcb2b">m_registeredSpecies</a></td></tr>
<tr class="memdesc:a452b0affb86dc971a96c80d01f4fcb2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set of registered species in the composition. <br /></td></tr>
<tr class="separator:a452b0affb86dc971a96c80d01f4fcb2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa05a640e0ea80142682bf4ee30a93c7f" id="r_aa05a640e0ea80142682bf4ee30a93c7f"><td class="memItemLeft" align="right" valign="top">std::map&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>, double &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa05a640e0ea80142682bf4ee30a93c7f">m_molarAbundances</a></td></tr>
<tr class="memdesc:aa05a640e0ea80142682bf4ee30a93c7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Map of species to their molar abundances. <br /></td></tr>
<tr class="separator:aa05a640e0ea80142682bf4ee30a93c7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02cd9d9608da082a200fdfa86d14bf5d" id="r_a02cd9d9608da082a200fdfa86d14bf5d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfourdst_1_1composition_1_1_composition_1_1_composition_cache.html">CompositionCache</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a02cd9d9608da082a200fdfa86d14bf5d">m_cache</a></td></tr>
<tr class="memdesc:a02cd9d9608da082a200fdfa86d14bf5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Cache for computed properties to avoid redundant calculations. <br /></td></tr>
<tr class="separator:a02cd9d9608da082a200fdfa86d14bf5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a36c2525d21cd932065bb2bb30bc57fb4" id="r_a36c2525d21cd932065bb2bb30bc57fb4"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a36c2525d21cd932065bb2bb30bc57fb4">operator&lt;&lt;</a> (std::ostream &amp;os, const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;composition)</td></tr>
<tr class="memdesc:a36c2525d21cd932065bb2bb30bc57fb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overloaded output stream operator for <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. <br /></td></tr>
<tr class="separator:a36c2525d21cd932065bb2bb30bc57fb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Manages a collection of chemical species and their abundances. </p>
<p>This class is a primary interface for defining and manipulating material compositions. In order to use the <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> class a user must first register symbols or species. Symbols are the string representation of a species (i.e. deuterium would be "H-2" whereas Beryllium 7 would be "Be-7") and then set the molar abundances. Species are the data structure <a class="el" href="structfourdst_1_1atomic_1_1_species.html" title="Represents an atomic species (isotope) with its fundamental physical properties.">fourdst::atomic::Species</a> version. Here Deuterium would be represented by the Species <a class="el" href="namespacefourdst_1_1atomic.html#a0eac406fa90f2925ea40737380ce0d74">fourdst::atomic::H_2</a> whereas Beryllium 7 would be <a class="el" href="namespacefourdst_1_1atomic.html#a800b0869c767928825a71ae0d2382a95">fourdst::atomic::Be_7</a>. Once the symbols/species have been registered the user can then set molar abundances.</p>
<p>Once the <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> object has been populated the user can query mass fractions, number fractions, electron abundances, mean particle mass, molar abundance, and Canonical (X, Y, Z) composition.</p>
<dl class="section note"><dt>Note</dt><dd>This class only accepts molar abundances as input. If you wish to construct a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> using a vector of mass fractions, those must first be converted to molar abundances. There is a helper function <code><a class="el" href="namespacefourdst_1_1composition.html#aa90b1ef07d607c0c829bedccf381cf54" title="Build a Composition object from symbols and their corresponding mass fractions.">fourdst::composition::buildCompositionFromMassFractions</a></code> which wll facilitate just that.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">This</td><td>class throws various exceptions from <code><a class="el" href="namespacefourdst_1_1composition_1_1exceptions.html">fourdst::composition::exceptions</a></code> for invalid operations, such as using unregistered symbols or providing invalid abundances.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Basic Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a3ab4dcda0bfd1a35b169bcc57fe66725">registerSymbol</a>(<span class="stringliteral">&quot;H-1&quot;</span>);</div>
<div class="line">comp.<a class="code hl_function" href="#a3ab4dcda0bfd1a35b169bcc57fe66725">registerSymbol</a>(<span class="stringliteral">&quot;He-4&quot;</span>);</div>
<div class="line">comp.<a class="code hl_function" href="#a262d7133035d4e6f45daa81827abf5e7">setMolarAbundance</a>(<span class="stringliteral">&quot;H-1&quot;</span>, 0.75);</div>
<div class="line">comp.<a class="code hl_function" href="#a262d7133035d4e6f45daa81827abf5e7">setMolarAbundance</a>(<span class="stringliteral">&quot;He-4&quot;</span>, 0.25); <span class="comment">// Note Molar Abundances do not need to sum to 1</span></div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a23b83b76ee025f6fc009184ee19bba88"><div class="ttname"><a href="#a23b83b76ee025f6fc009184ee19bba88">fourdst::composition::Composition::Composition</a></div><div class="ttdeci">Composition()=default</div><div class="ttdoc">Default constructor.</div></div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a262d7133035d4e6f45daa81827abf5e7"><div class="ttname"><a href="#a262d7133035d4e6f45daa81827abf5e7">fourdst::composition::Composition::setMolarAbundance</a></div><div class="ttdeci">void setMolarAbundance(const std::string &amp;symbol, const double &amp;molar_abundance)</div><div class="ttdoc">Sets the molar abundance for a given symbol.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00529">composition.cpp:529</a></div></div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a3ab4dcda0bfd1a35b169bcc57fe66725"><div class="ttname"><a href="#a3ab4dcda0bfd1a35b169bcc57fe66725">fourdst::composition::Composition::registerSymbol</a></div><div class="ttdeci">void registerSymbol(const std::string &amp;symbol)</div><div class="ttdoc">Registers a new symbol for inclusion in the composition.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00178">composition.cpp:178</a></div></div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00097">97</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a23b83b76ee025f6fc009184ee19bba88" name="a23b83b76ee025f6fc009184ee19bba88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23b83b76ee025f6fc009184ee19bba88">&#9670;&#160;</a></span>Composition() <span class="overload">[1/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel default">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p>Creates an empty <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> object. No symbols or species are registered initially; however, the user can register symbols or species later using the provided methods. </p>
</div>
</div>
<a id="a08c1d1fe9384c5255a6ba40e34b18315" name="a08c1d1fe9384c5255a6ba40e34b18315"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a08c1d1fe9384c5255a6ba40e34b18315">&#9670;&#160;</a></span>~Composition()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::~Composition </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel override">override</span><span class="mlabel default">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default destructor. </p>
</div>
</div>
<a id="ae3cc2099efd7db8eec3d9af2294b75fa" name="ae3cc2099efd7db8eec3d9af2294b75fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3cc2099efd7db8eec3d9af2294b75fa">&#9670;&#160;</a></span>Composition() <span class="overload">[2/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given symbols from a vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to register. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if any symbol is invalid. Symbols are invalid if they are not registered at compile time in the atomic species database (<code><a class="el" href="species_8h.html">fourdst/atomic/species.h</a></code>). </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::vector&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp(symbols);</div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html"><div class="ttname"><a href="classfourdst_1_1composition_1_1_composition.html">fourdst::composition::Composition</a></div><div class="ttdoc">Manages a collection of chemical species and their abundances.</div><div class="ttdef"><b>Definition</b> <a href="composition_8h_source.html#l00097">composition.h:97</a></div></div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00084">84</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="afa95dddfa88a101ad6ce261295a4460c" name="afa95dddfa88a101ad6ce261295a4460c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa95dddfa88a101ad6ce261295a4460c">&#9670;&#160;</a></span>Composition() <span class="overload">[3/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given species from a vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to register. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::vector&lt;fourdst::atomic::Species&gt; species = {<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a>, <a class="code hl_function" href="namespacefourdst_1_1atomic.html#af2588b97ce949e37c193d6a3e5cb84a0">fourdst::atomic::O_16</a>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp(species);</div>
<div class="ttc" id="anamespacefourdst_1_1atomic_html_a6766bc834fd656df51bdcf22f7d97877"><div class="ttname"><a href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a></div><div class="ttdeci">static const Species H_1(&quot;H-1&quot;, &quot;H&quot;, -1, 0, 1, 1, 0.0, &quot;B-&quot;, std::numeric_limits&lt; double &gt;::quiet_NaN(), std::numeric_limits&lt; double &gt;::infinity(), &quot;/2+*&quot;, &quot;S=99.9855 78&quot;, 1.007825031898, 1.4e-05)</div></div>
<div class="ttc" id="anamespacefourdst_1_1atomic_html_af2588b97ce949e37c193d6a3e5cb84a0"><div class="ttname"><a href="namespacefourdst_1_1atomic.html#af2588b97ce949e37c193d6a3e5cb84a0">fourdst::atomic::O_16</a></div><div class="ttdeci">static const Species O_16(&quot;O-16&quot;, &quot;O&quot;, 0, 8, 8, 16, 7976.2072, &quot;B-&quot;, -15412.184, std::numeric_limits&lt; double &gt;::infinity(), &quot;+&quot;, &quot;S=99.757 11&quot;, 15.99491461926, 0.00032)</div></div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Because species are strongly typed, this constructor does not need to check if the species is valid. that is to say that the compiler will only allow valid species to be passed in. Therefore, this constructor is marked noexcept and may therefore be slightly more performant than the symbol-based constructor. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00100">100</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a2d6fbe5c8142b358641bbe7ffde51053" name="a2d6fbe5c8142b358641bbe7ffde51053"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d6fbe5c8142b358641bbe7ffde51053">&#9670;&#160;</a></span>Composition() <span class="overload">[4/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::set&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given symbols from a set. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to register. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if any symbol is invalid. Symbols are invalid if they are not registered at compile time in the atomic species database (<code><a class="el" href="species_8h.html">fourdst/atomic/species.h</a></code>). </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::set&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp(symbols);</div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00092">92</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a7d19fb3326e51c8fc8db5e0738e97d95" name="a7d19fb3326e51c8fc8db5e0738e97d95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d19fb3326e51c8fc8db5e0738e97d95">&#9670;&#160;</a></span>Composition() <span class="overload">[5/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel explicit">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> and registers the given species from a set. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to register. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::set&lt;fourdst::atomic::Species&gt; species = {<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a>, <a class="code hl_function" href="namespacefourdst_1_1atomic.html#af2588b97ce949e37c193d6a3e5cb84a0">fourdst::atomic::O_16</a>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp(species);</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Because species are strongly typed, this constructor does not need to check if the species is valid. that is to say that the compiler will only allow valid species to be passed in. Therefore, this constructor is marked noexcept and may therefore be slightly more performant than the symbol-based constructor. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00108">108</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a0b3c93ce7c9473ac4aa4c9ee04f78051" name="a0b3c93ce7c9473ac4aa4c9ee04f78051"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b3c93ce7c9473ac4aa4c9ee04f78051">&#9670;&#160;</a></span>Composition() <span class="overload">[6/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>molarAbundances</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from symbols and their corresponding molar abundances. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to register. </td></tr>
<tr><td class="paramname">molarAbundances</td><td>The corresponding molar abundances for each symbol. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if any symbol is invalid. Symbols are invalid if they are not registered at compile time in the atomic species database (<code><a class="el" href="species_8h.html">fourdst/atomic/species.h</a></code>). </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the number of symbols does not match the number of molar abundances. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::vector&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line">std::vector&lt;double&gt; molarAbundances = {1.03, 0.6};</div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp(symbols, molarAbundances);</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Molar abundances do not need to sum to 1.0, they are an absolute quantity. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00116">116</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a7f0798b3f1191561b38f336406acf62a" name="a7f0798b3f1191561b38f336406acf62a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f0798b3f1191561b38f336406acf62a">&#9670;&#160;</a></span>Composition() <span class="overload">[7/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>molarAbundances</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from species and their corresponding molar abundances. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to register. </td></tr>
<tr><td class="paramname">molarAbundances</td><td>The corresponding molar abundances for each species. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the number of species does not match the number of molar abundances. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::vector&lt;fourdst::atomic::Species&gt; species = {<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a>, <a class="code hl_function" href="namespacefourdst_1_1atomic.html#af2588b97ce949e37c193d6a3e5cb84a0">fourdst::atomic::O_16</a>};</div>
<div class="line">std::vector&lt;double&gt; molarAbundances = {1.03, 0.6};</div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp(species, molarAbundances);</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Molar abundances do not need to sum to 1.0, they are an absolute quantity. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00131">131</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ad6cdb28598267743f236d053cd5a62ae" name="ad6cdb28598267743f236d053cd5a62ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6cdb28598267743f236d053cd5a62ae">&#9670;&#160;</a></span>Composition() <span class="overload">[8/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const std::set&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>molarAbundances</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from symbols in a set and their corresponding molar abundances. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to register. </td></tr>
<tr><td class="paramname">molarAbundances</td><td>The corresponding molar abundances for each symbol. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if any symbol is invalid. Symbols are invalid if they are not registered at compile time in the atomic species database (<code><a class="el" href="species_8h.html">fourdst/atomic/species.h</a></code>). </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the number of symbols does not match the number of molar abundances. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::set&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line">std::vector&lt;double&gt; molarAbundances = {1.03, 0.6};</div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp(symbols, molarAbundances);</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Molar abundances do not need to sum to 1.0, they are an absolute quantity. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00146">146</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a21369a80378d4c90438a34f0e4a275ca" name="a21369a80378d4c90438a34f0e4a275ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21369a80378d4c90438a34f0e4a275ca">&#9670;&#160;</a></span>Composition() <span class="overload">[9/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">fourdst::composition::Composition::Composition </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;</td> <td class="paramname"><span class="paramname"><em>composition</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> from another <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">composition</td><td>The <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> to copy. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00161">161</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab1701644ff1c83c220dc04eb58d1621b" name="ab1701644ff1c83c220dc04eb58d1621b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1701644ff1c83c220dc04eb58d1621b">&#9670;&#160;</a></span>begin() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto fourdst::composition::Composition::begin </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator to the beginning of the molar abundance map. </p>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the beginning.</dd></dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp({<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>, <span class="stringliteral">&quot;C-12&quot;</span>}, {1.02, 0.56, 0.02});</div>
<div class="line"> </div>
<div class="line"><span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; [sp, y] : comp) {</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Species: &quot;</span> &lt;&lt; sp &lt;&lt; <span class="stringliteral">&quot;, Molar Abundance: &quot;</span> &lt;&lt; y &lt;&lt; std::endl;</div>
<div class="line">}</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Because we store molar abundances as a sorted map, keyed by species. And Because the &lt; and &gt; operators for species are defined based on their atomic mass. When iterating over the molar abundance map, species will be seen in order from lightest to heaviest. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00753">753</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="adf41a833e8b704daf4f581fca5c8cb9b" name="adf41a833e8b704daf4f581fca5c8cb9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf41a833e8b704daf4f581fca5c8cb9b">&#9670;&#160;</a></span>begin() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto fourdst::composition::Composition::begin </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a const iterator to the beginning of the molar abundance map. </p>
<dl class="section return"><dt>Returns</dt><dd>A const iterator to the beginning.</dd></dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp({<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>, <span class="stringliteral">&quot;C-12&quot;</span>}, {1.02, 0.56, 0.02});</div>
<div class="line"> </div>
<div class="line"><span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; [sp, y] : comp) {</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Species: &quot;</span> &lt;&lt; sp &lt;&lt; <span class="stringliteral">&quot;, Molar Abundance: &quot;</span> &lt;&lt; y &lt;&lt; std::endl;</div>
<div class="line">}</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Because we store molar abundances as a sorted map, keyed by species. And Because the &lt; and &gt; operators for species are defined based on their atomic mass. When iterating over the molar abundance map, species will be seen in order from lightest to heaviest. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00774">774</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a194f715788e7921bd611579440de2ecd" name="a194f715788e7921bd611579440de2ecd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a194f715788e7921bd611579440de2ecd">&#9670;&#160;</a></span>contains() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::contains </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a given species is present in the composition. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The isotope to check for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the species is in the composition, false otherwise. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#af42050fabc3c888d77f0fc98f08bc80a">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00509">509</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ac3bfb56a2587215a59894e76d4867ede" name="ac3bfb56a2587215a59894e76d4867ede"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac3bfb56a2587215a59894e76d4867ede">&#9670;&#160;</a></span>contains() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fourdst::composition::Composition::contains </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a given symbol is present in the composition. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to check for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the symbol is in the composition, false otherwise. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if the symbol is not in the atomic species database. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#aebd1997d8b3a59356f587c234b290796">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00515">515</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="adeaf6f1213e78cb1fe8a8317f0a8adc2" name="adeaf6f1213e78cb1fe8a8317f0a8adc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adeaf6f1213e78cb1fe8a8317f0a8adc2">&#9670;&#160;</a></span>end() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto fourdst::composition::Composition::end </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns an iterator to the end of the molar abundance map. </p>
<dl class="section return"><dt>Returns</dt><dd>An iterator to the end.</dd></dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp({<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>, <span class="stringliteral">&quot;C-12&quot;</span>}, {1.02, 0.56, 0.02});</div>
<div class="line"> </div>
<div class="line"><span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; [sp, y] : comp) {</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Species: &quot;</span> &lt;&lt; sp &lt;&lt; <span class="stringliteral">&quot;, Molar Abundance: &quot;</span> &lt;&lt; y &lt;&lt; std::endl;</div>
<div class="line">}</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Because we store molar abundances as a sorted map, keyed by species. And Because the &lt; and &gt; operators for species are defined based on their atomic mass. When iterating over the molar abundance map, species will be seen in order from lightest to heaviest. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00795">795</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="aed2f5676f8f742199f01e4d1e9664bdd" name="aed2f5676f8f742199f01e4d1e9664bdd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed2f5676f8f742199f01e4d1e9664bdd">&#9670;&#160;</a></span>end() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto fourdst::composition::Composition::end </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns a const iterator to the end of the molar abundance map. </p>
<dl class="section return"><dt>Returns</dt><dd>A const iterator to the end.</dd></dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp({<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>, <span class="stringliteral">&quot;C-12&quot;</span>}, {1.02, 0.56, 0.02});</div>
<div class="line"> </div>
<div class="line"><span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; [sp, y] : comp) {</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;Species: &quot;</span> &lt;&lt; sp &lt;&lt; <span class="stringliteral">&quot;, Molar Abundance: &quot;</span> &lt;&lt; y &lt;&lt; std::endl;</div>
<div class="line">}</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Because we store molar abundances as a sorted map, keyed by species. And Because the &lt; and &gt; operators for species are defined based on their atomic mass. When iterating over the molar abundance map, species will be seen in order from lightest to heaviest. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00816">816</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="aac5b214a3d1278e127422224cb9cee50" name="aac5b214a3d1278e127422224cb9cee50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac5b214a3d1278e127422224cb9cee50">&#9670;&#160;</a></span>getCanonicalComposition()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfourdst_1_1composition_1_1_canonical_composition.html">CanonicalComposition</a> fourdst::composition::Composition::getCanonicalComposition </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the canonical composition (X, Y, Z) of the composition. </p>
<p>The canonical composition is defined as:</p><ul>
<li>X: mass fraction of hydrogen ( <img class="formulaInl" alt="$\sum_{i=1}^{7}X_{^{i}H}$" src="form_7.png" width="55" height="16"/>)</li>
<li>Y: mass fraction of helium ( <img class="formulaInl" alt="$\sum_{i=3}^{10}X_{^{i}He}$" src="form_8.png" width="60" height="16"/>)</li>
<li>Z: mass fraction of all other elements (Everything else)</li>
</ul>
<p>The canonical composition is computed by summing the mass fractions of all registered species in the composition according to their element type.</p>
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="structfourdst_1_1composition_1_1_canonical_composition.html" title="Represents the canonical (X, Y, Z) composition of stellar material.">CanonicalComposition</a> struct containing the X, Y, and Z values.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if, after constructing the canonical composition, the sum X + Y + Z is not approximately equal to 1.0 (within a tolerance of 1e-16) </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00330">330</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a90fc71d1fe03017ee4c7a1cac69d24fb" name="a90fc71d1fe03017ee4c7a1cac69d24fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a90fc71d1fe03017ee4c7a1cac69d24fb">&#9670;&#160;</a></span>getElectronAbundance()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getElectronAbundance </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the electron abundance of the composition. </p>
<p>The electron abundance is calculated using the formula: </p><p class="formulaDsp">
<img class="formulaDsp" alt="\[Y_e = \sum_i (Y_i \cdot Z_i)
\]" src="form_13.png" width="90" height="28"/>
</p>
<p> where:</p><ul>
<li><img class="formulaInl" alt="$Y_i$" src="form_10.png" width="11" height="13"/> is the molar abundance of species i.</li>
<li><img class="formulaInl" alt="$Z_i$" src="form_6.png" width="11" height="13"/> is the atomic number (number of protons) of species i.</li>
</ul>
<dl class="section return"><dt>Returns</dt><dd>Ye (electron abundance). </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a86b60205094ed72435ee84abf9498e21">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00321">321</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a46a706f9e4c06a45b45ae3dffdde5e9e" name="a46a706f9e4c06a45b45ae3dffdde5e9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46a706f9e4c06a45b45ae3dffdde5e9e">&#9670;&#160;</a></span>getLogger()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static quill::Logger * fourdst::composition::Composition::getLogger </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span><span class="mlabel static">static</span><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the logger instance for the <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> class. This is static to ensure that all composition objects share the same logger instance. </p>
<dl class="section return"><dt>Returns</dt><dd>pointer to the logger instance. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00144">144</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a9ea2b673341fdc67afeb0f0517a54c8c" name="a9ea2b673341fdc67afeb0f0517a54c8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ea2b673341fdc67afeb0f0517a54c8c">&#9670;&#160;</a></span>getMassFraction() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unordered_map&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>, double &gt; fourdst::composition::Composition::getMassFraction </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the mass fractions of all species in the composition. </p>
<dl class="section return"><dt>Returns</dt><dd>An unordered map of symbols to their mass fractions.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This method will construct a new unordered map each time it is called. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#afb72c61da511b7963382804a0e87a54a">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00251">251</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ae8fe4e7158f8317bf29b5cd0c65a9524" name="ae8fe4e7158f8317bf29b5cd0c65a9524"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae8fe4e7158f8317bf29b5cd0c65a9524">&#9670;&#160;</a></span>getMassFraction() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMassFraction </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the mass fraction for a given species. </p>
<p>The mass fraction X_i for a species is calculated using the formula: </p><p class="formulaDsp">
<img class="formulaDsp" alt="\[X_i = \frac{(Y_i \cdot A_i)}{\sum_j (Y_j \cdot A_j)}
\]" src="form_9.png" width="98" height="34"/>
</p>
<p> where:</p><ul>
<li><img class="formulaInl" alt="$Y_i$" src="form_10.png" width="11" height="13"/> is the molar abundance of species i.</li>
<li><img class="formulaInl" alt="$A_i$" src="form_2.png" width="14" height="13"/> is the atomic mass of species i.</li>
<li>The denominator sums over all species j in the composition.</li>
</ul>
<p>This formula ensures that the mass fractions of all species sum to 1.0.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to get the mass fraction for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mass fraction for the given isotope. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the isotope is not registered in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a401e8298ed93b7963624e8a17eb17b55">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00235">235</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ae5d8d21632fca2b35b0898f2b205cd10" name="ae5d8d21632fca2b35b0898f2b205cd10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5d8d21632fca2b35b0898f2b205cd10">&#9670;&#160;</a></span>getMassFraction() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMassFraction </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the mass fraction for a given symbol. See the overload for species-based lookup for more details on how mass fractions are calculated. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to get the mass fraction for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The mass fraction for the given symbol. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if the symbol is not in the atomic species database. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ae0044d30efddccacc9fe7c8e58003066">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00227">227</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="af4f44aaf8b7e0d63872a70b5e2131369" name="af4f44aaf8b7e0d63872a70b5e2131369"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4f44aaf8b7e0d63872a70b5e2131369">&#9670;&#160;</a></span>getMassFractionVector()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::getMassFractionVector </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a uniform vector representation of the mass fraction stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section return"><dt>Returns</dt><dd>the vector of mass fractions sorted by species mass (lightest to heaviest). </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a82583ffa3c08297cda6c3957a6a7dbc6">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00373">373</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="afbbb5e51ad5ae5c0fa6bc0094195aecd" name="afbbb5e51ad5ae5c0fa6bc0094195aecd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbbb5e51ad5ae5c0fa6bc0094195aecd">&#9670;&#160;</a></span>getMeanParticleMass()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMeanParticleMass </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the mean particle mass of the composition. </p>
<p>The mean particle mass is calculated using the formula: </p><p class="formulaDsp">
<img class="formulaDsp" alt="\[\bar{A} = \frac{\sum_i (Y_i \cdot A_i)}{\sum_j Y_j}
\]" src="form_12.png" width="90" height="34"/>
</p>
<p> where:</p><ul>
<li><img class="formulaInl" alt="$Y_i$" src="form_10.png" width="11" height="13"/> is the molar abundance of species i.</li>
<li><img class="formulaInl" alt="$A_i$" src="form_2.png" width="14" height="13"/> is the atomic mass of species i.</li>
<li>The sums run over all species i in the composition.</li>
</ul>
<dl class="section return"><dt>Returns</dt><dd>Mean particle mass in atomic mass units (g/mol). </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a85bf97a30ecadd0750bece4442f4deff">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00311">311</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a78a43e9e77a9c1b0f27c50b9feb52449" name="a78a43e9e77a9c1b0f27c50b9feb52449"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78a43e9e77a9c1b0f27c50b9feb52449">&#9670;&#160;</a></span>getMolarAbundance() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMolarAbundance </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the molar abundance for a given species. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to get the molar abundance for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The molar abundance for the given isotope. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the isotope is not registered in the composition.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>These are the most performant quantities to retrieve since they are stored directly in the composition object and require no computation. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a4cfc9e37370caae275c0f801b700e37b">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00302">302</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="add67a92d73e3a57a2bbdb52bc9ca3bfe" name="add67a92d73e3a57a2bbdb52bc9ca3bfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add67a92d73e3a57a2bbdb52bc9ca3bfe">&#9670;&#160;</a></span>getMolarAbundance() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getMolarAbundance </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the molar abundances of all species in the composition. </p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if any symbol is not in the atomic species database. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if any symbol is not in the composition. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The molar abundance of the symbol.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>These are the most performant quantities to retrieve since they are stored directly in the composition object and require no computation. This overload is slightly less performant than the species-based overload since it needs to validate the symbol exists in the atomic species database. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a71fb459bf4375af2fe33c8a7c0747ce0">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00291">291</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="abcb391f5fca2b636127e48e681e4c3ee" name="abcb391f5fca2b636127e48e681e4c3ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abcb391f5fca2b636127e48e681e4c3ee">&#9670;&#160;</a></span>getMolarAbundanceVector()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::getMolarAbundanceVector </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a uniform vector representation of the molar abundances stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section return"><dt>Returns</dt><dd>the vector of molar abundances sorted by species mass (lightest to heaviest). </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a1ad7a33d17db32b2c9ce0a30cd6628f9">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00416">416</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a1f87ed64a1be9a6091c852131d24e476" name="a1f87ed64a1be9a6091c852131d24e476"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f87ed64a1be9a6091c852131d24e476">&#9670;&#160;</a></span>getNumberFraction() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unordered_map&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>, double &gt; fourdst::composition::Composition::getNumberFraction </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number fractions of all species in the composition. </p>
<dl class="section return"><dt>Returns</dt><dd>An unordered map of symbols to their number fractions.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This method will construct a new unordered map each time it is called. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a506ef92e69f99ad02598c8d178df1c31">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00283">283</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a1aa79993925f16ba3c30a376aa39161b" name="a1aa79993925f16ba3c30a376aa39161b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1aa79993925f16ba3c30a376aa39161b">&#9670;&#160;</a></span>getNumberFraction() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getNumberFraction </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number fraction for a given species. </p>
<p>The number fraction Y_i for a species is calculated using the formula: </p><p class="formulaDsp">
<img class="formulaDsp" alt="\[X_i = \frac{Y_i}{\sum_j Y_j}
\]" src="form_11.png" width="66" height="33"/>
</p>
<p> where:</p><ul>
<li><img class="formulaInl" alt="$Y_i$" src="form_10.png" width="11" height="13"/> is the molar abundance of species i.</li>
<li>The denominator sums over all species j in the composition.</li>
</ul>
<p>This formula ensures that the number fractions of all species sum to 1.0.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to get the number fraction for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number fraction for the given isotope. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the isotope is not registered in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a27d1d91203adb736454aa9b9936fc8c3">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00270">270</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a34f71d4d8f0297c576fd62fabd490305" name="a34f71d4d8f0297c576fd62fabd490305"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34f71d4d8f0297c576fd62fabd490305">&#9670;&#160;</a></span>getNumberFraction() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">double fourdst::composition::Composition::getNumberFraction </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number fraction for a given symbol. See the overload for species-based lookup for more details on how number fractions are calculated. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to get the number fraction for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number fraction for the given symbol. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if the symbol is not in the atomic species database. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not in the composition. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ae6026b1335230c6dfbd897ec8dfda295">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00260">260</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ae4f72972cf4d1ff422d0790080e11473" name="ae4f72972cf4d1ff422d0790080e11473"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4f72972cf4d1ff422d0790080e11473">&#9670;&#160;</a></span>getNumberFractionVector()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; double &gt; fourdst::composition::Composition::getNumberFractionVector </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a uniform vector representation of the number fractions stored in the composition object sorted such that the lightest species is at index 0 and the heaviest is at the last index. </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="section return"><dt>Returns</dt><dd>the vector of number fractions sorted by species mass (lightest to heaviest). </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a883ea47508557952b9f15432bf0be376">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00395">395</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a33db253ca50431b5166d43412ff18f71" name="a33db253ca50431b5166d43412ff18f71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33db253ca50431b5166d43412ff18f71">&#9670;&#160;</a></span>getRegisteredSpecies()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp; fourdst::composition::Composition::getRegisteredSpecies </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a set of all species that are registered in the composition. </p>
<dl class="section return"><dt>Returns</dt><dd>A set of <code><a class="el" href="structfourdst_1_1atomic_1_1_species.html" title="Represents an atomic species (isotope) with its fundamental physical properties.">atomic::Species</a></code> objects registered in the composition.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This will return a constant reference to the internal m_registeredSpecies set, therefore the return value of this method will only be valid as long as the <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> object is valid (i.e. it cannot outlive the <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> object it was called on). </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ae6e7152d69fc5f5a128f8cb2cfce1587">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00222">222</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a3ae885c28580ae15be8c16614bef3b0e" name="a3ae885c28580ae15be8c16614bef3b0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ae885c28580ae15be8c16614bef3b0e">&#9670;&#160;</a></span>getRegisteredSymbols()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::set&lt; std::string &gt; fourdst::composition::Composition::getRegisteredSymbols </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the registered symbols. </p>
<dl class="section return"><dt>Returns</dt><dd>A set of registered symbols.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This method will construct a new set each time it is called. If you need just need access to the registered species, consider using <code><a class="el" href="#a33db253ca50431b5166d43412ff18f71" title="Get a set of all species that are registered in the composition.">getRegisteredSpecies()</a></code> instead which returns a constant reference to the internal set. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a5a4362dc0d77659b75d528a0e884ed7b">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00214">214</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ae4f854ded38f5e6fcd157a74a57cbf0c" name="ae4f854ded38f5e6fcd157a74a57cbf0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4f854ded38f5e6fcd157a74a57cbf0c">&#9670;&#160;</a></span>getSpeciesAtIndex()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> fourdst::composition::Composition::getSpeciesAtIndex </td>
<td>(</td>
<td class="paramtype">size_t</td> <td class="paramname"><span class="paramname"><em>index</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the species at a given index in the sorted vector representation. </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">index</td><td>The index in the sorted vector representation for which to return the species. Must be in [0, N-1] where N is the number of registered species. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">std::out_of_range</td><td>if the index is out of range. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The species at the given index in the sorted vector representation. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#aaee3651c1672b2763181e966e4525ba6">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00483">483</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a3d220b42fa06d7d3a43944ee2b8f6a5f" name="a3d220b42fa06d7d3a43944ee2b8f6a5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d220b42fa06d7d3a43944ee2b8f6a5f">&#9670;&#160;</a></span>getSpeciesIndex() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t fourdst::composition::Composition::getSpeciesIndex </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get the index in the sorted vector representation for a given symbol </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>the species to look up the index for. Note that this is the index species data will be at if you were to call <a class="el" href="#abcb391f5fca2b636127e48e681e4c3ee" title="Get a uniform vector representation of the molar abundances stored in the composition object sorted s...">getMolarAbundanceVector()</a>, <a class="el" href="#af4f44aaf8b7e0d63872a70b5e2131369" title="Get a uniform vector representation of the mass fraction stored in the composition object sorted such...">getMassFractionVector()</a>, or <a class="el" href="#ae4f72972cf4d1ff422d0790080e11473" title="Get a uniform vector representation of the number fractions stored in the composition object sorted s...">getNumberFractionVector()</a> </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not registered in the composition </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the symbol in the sorted vector representation. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#ab41311a8c20a9556d087a604da735767">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00449">449</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a0d94f62402bb90b5d12679faeaa8c5d7" name="a0d94f62402bb90b5d12679faeaa8c5d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d94f62402bb90b5d12679faeaa8c5d7">&#9670;&#160;</a></span>getSpeciesIndex() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t fourdst::composition::Composition::getSpeciesIndex </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get the index in the sorted vector representation for a given symbol </p>
<p>This is primarily useful for external libraries which need to ensure that vector representation uniformity is maintained </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>the symbol to look up the index for. Note that this is the index species data will be at if you were to call <a class="el" href="#abcb391f5fca2b636127e48e681e4c3ee" title="Get a uniform vector representation of the molar abundances stored in the composition object sorted s...">getMolarAbundanceVector()</a>, <a class="el" href="#af4f44aaf8b7e0d63872a70b5e2131369" title="Get a uniform vector representation of the mass fraction stored in the composition object sorted such...">getMassFractionVector()</a>, or <a class="el" href="#ae4f72972cf4d1ff422d0790080e11473" title="Get a uniform vector representation of the number fractions stored in the composition object sorted s...">getNumberFractionVector()</a> </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if the symbol is not in the atomic species database. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not registered in the composition </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The index of the symbol in the sorted vector representation. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a1e5195debe590960aa064289733958ba">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00438">438</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a4ec1e23cfecef764cb831171fed62fc2" name="a4ec1e23cfecef764cb831171fed62fc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ec1e23cfecef764cb831171fed62fc2">&#9670;&#160;</a></span>operator=()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp; fourdst::composition::Composition::operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> const &amp;</td> <td class="paramname"><span class="paramname"><em>other</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>The <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> to assign from. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A reference to this <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00168">168</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a392a34c19f45d6c936cc7030e6cfaf3f" name="a392a34c19f45d6c936cc7030e6cfaf3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a392a34c19f45d6c936cc7030e6cfaf3f">&#9670;&#160;</a></span>registerSpecies() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::registerSpecies </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a new species by extracting its symbol. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The species to register. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;fourdst/composition/species.h&quot;</span></div>
<div class="line"> </div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a392a34c19f45d6c936cc7030e6cfaf3f">registerSpecies</a>(<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a21ab5363d81d491f5230e8d90a149f31">fourdst::atomic::C_12</a>);</div>
<div class="ttc" id="aclassfourdst_1_1composition_1_1_composition_html_a392a34c19f45d6c936cc7030e6cfaf3f"><div class="ttname"><a href="#a392a34c19f45d6c936cc7030e6cfaf3f">fourdst::composition::Composition::registerSpecies</a></div><div class="ttdeci">void registerSpecies(const atomic::Species &amp;species) noexcept</div><div class="ttdoc">Registers a new species by extracting its symbol.</div><div class="ttdef"><b>Definition</b> <a href="composition_8cpp_source.html#l00197">composition.cpp:197</a></div></div>
<div class="ttc" id="anamespacefourdst_1_1atomic_html_a21ab5363d81d491f5230e8d90a149f31"><div class="ttname"><a href="namespacefourdst_1_1atomic.html#a21ab5363d81d491f5230e8d90a149f31">fourdst::atomic::C_12</a></div><div class="ttdeci">static const Species C_12(&quot;C-12&quot;, &quot;C&quot;, 0, 6, 6, 12, 7680.1446, &quot;B-&quot;, -17338.0681, std::numeric_limits&lt; double &gt;::infinity(), &quot;+&quot;, &quot;S=98.94 6&quot;, 12.0, 0.0)</div></div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Because species are strongly typed, this method does not need to check if the species is valid. that is to say that the compiler will only allow valid species to be passed in. Therefore, this method is marked noexcept and may therefore be slightly more performant than the symbol-based method.</dd>
<dd>
upon registering a species, its molar abundance is initialized to 0.0.</dd>
<dd>
All species are in the <code><a class="el" href="species_8h.html">fourdst/atomic/species.h</a></code> header file. These can be accessed directly through their fully qualified names (e.g., <code><a class="el" href="namespacefourdst_1_1atomic.html#a21ab5363d81d491f5230e8d90a149f31">fourdst::atomic::C_12</a></code> for Carbon-12). Alternatively, these can also be accessed through a string-indexed map located in <code><a class="el" href="species_8h.html">fourdst/atomic/species.h</a></code> called <code><a class="el" href="namespacefourdst_1_1atomic.html#a3f619cc8f8b2cd718a4082c6adb0de90" title="Map of species names to their corresponding Species objects.">fourdst::atomic::species</a></code> ( e.g., <code>fourdst::atomic::species.at("C-12")</code> for Carbon-12). </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00197">197</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a2846f4ea0d6075ecdaf4334741a54750" name="a2846f4ea0d6075ecdaf4334741a54750"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2846f4ea0d6075ecdaf4334741a54750">&#9670;&#160;</a></span>registerSpecies() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::registerSpecies </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a vector of new species. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The vector of species to register. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;fourdst/composition/species.h&quot;</span></div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">std::vector&lt;fourdst::atomic::Species&gt; my_species = { ... };</div>
<div class="line">comp.<a class="code hl_function" href="#a392a34c19f45d6c936cc7030e6cfaf3f">registerSpecies</a>(my_species);</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>upon registering a species, its molar abundance is initialized to 0.0. Therefore, registering a vector of species will initialize all their molar abundances to 0.0.</dd>
<dd>
All species are in the <code><a class="el" href="species_8h.html">fourdst/atomic/species.h</a></code> header file. These can be accessed directly through their fully qualified names (e.g., <code><a class="el" href="namespacefourdst_1_1atomic.html#a21ab5363d81d491f5230e8d90a149f31">fourdst::atomic::C_12</a></code> for Carbon-12). Alternatively, these can also be accessed through a string-indexed map located in <code><a class="el" href="species_8h.html">fourdst/atomic/species.h</a></code> called <code><a class="el" href="namespacefourdst_1_1atomic.html#a3f619cc8f8b2cd718a4082c6adb0de90" title="Map of species names to their corresponding Species objects.">fourdst::atomic::species</a></code> ( e.g., <code>fourdst::atomic::species.at("C-12")</code> for Carbon-12). </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00206">206</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a3ab4dcda0bfd1a35b169bcc57fe66725" name="a3ab4dcda0bfd1a35b169bcc57fe66725"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ab4dcda0bfd1a35b169bcc57fe66725">&#9670;&#160;</a></span>registerSymbol() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::registerSymbol </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers a new symbol for inclusion in the composition. </p>
<p>A symbol must be registered before its abundance can be set. </p><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to register (e.g., "Fe-56"). </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if the symbol is not in the atomic species database. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a3ab4dcda0bfd1a35b169bcc57fe66725">registerSymbol</a>(<span class="stringliteral">&quot;H-1&quot;</span>);</div>
<div class="line">comp.<a class="code hl_function" href="#a3ab4dcda0bfd1a35b169bcc57fe66725">registerSymbol</a>(<span class="stringliteral">&quot;He-4&quot;</span>);</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>upon registering a symbol, its molar abundance is initialized to 0.0. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00178">178</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a156d1198ef47deed9689949f271969e2" name="a156d1198ef47deed9689949f271969e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a156d1198ef47deed9689949f271969e2">&#9670;&#160;</a></span>registerSymbol() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::registerSymbol </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Registers multiple new symbols. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to register. </td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if any symbol is invalid. </td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::vector&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;O-16&quot;</span>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp;</div>
<div class="line">comp.<a class="code hl_function" href="#a3ab4dcda0bfd1a35b169bcc57fe66725">registerSymbol</a>(symbols);</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>upon registering a symbol, its molar abundance is initialized to 0.0. Therefore, registering a vector of symbols will initialize all their molar abundances to 0.0. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00189">189</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ac386709ef1e872fa558b8e30fc8b4c44" name="ac386709ef1e872fa558b8e30fc8b4c44"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac386709ef1e872fa558b8e30fc8b4c44">&#9670;&#160;</a></span>setMolarAbundance() <span class="overload">[1/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::setMolarAbundance </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>molar_abundance</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the molar abundance for a given isotope. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The isotope to set the molar abundance for. </td></tr>
<tr><td class="paramname">molar_abundance</td><td>The molar abundance to set.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the isotope is not registered in the composition. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the molar abundance is negative.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;fourdst/composition/species.h&quot;</span></div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp({<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a>, <a class="code hl_function" href="namespacefourdst_1_1atomic.html#ab665e3014e2a805624227350699f141a">fourdst::atomic::He_4</a>});</div>
<div class="line">comp.setMolarAbundance(<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a>, 1.0);</div>
<div class="line">comp.setMolarAbundance(<a class="code hl_function" href="namespacefourdst_1_1atomic.html#ab665e3014e2a805624227350699f141a">fourdst::atomic::He_4</a>, 0.5);</div>
<div class="ttc" id="anamespacefourdst_1_1atomic_html_ab665e3014e2a805624227350699f141a"><div class="ttname"><a href="namespacefourdst_1_1atomic.html#ab665e3014e2a805624227350699f141a">fourdst::atomic::He_4</a></div><div class="ttdeci">static const Species He_4(&quot;He-4&quot;, &quot;He&quot;, 0, 2, 2, 4, 7073.9156, &quot;B-&quot;, -22898.274, std::numeric_limits&lt; double &gt;::infinity(), &quot;+&quot;, &quot;S=99.9998 2&quot;, 4.00260325413, 0.00016)</div></div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Since this method does not need to validate the species exists in the database, it will generally be slightly more performant than the symbol-based method. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00541">541</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ad7af2f8f3050969a6c5b9a9ef5fead64" name="ad7af2f8f3050969a6c5b9a9ef5fead64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7af2f8f3050969a6c5b9a9ef5fead64">&#9670;&#160;</a></span>setMolarAbundance() <span class="overload">[2/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::setMolarAbundance </td>
<td>(</td>
<td class="paramtype">const std::set&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>molar_abundances</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the molar abundances for a set of isotopes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The isotopes to set the molar abundances for. </td></tr>
<tr><td class="paramname">molar_abundances</td><td>The molar abundances to set.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if any isotope is not registered in the composition. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if any molar abundance is negative.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;fourdst/composition/species.h&quot;</span></div>
<div class="line">std::set&lt;fourdst::atomic::Species&gt; species = {<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a>, <a class="code hl_function" href="namespacefourdst_1_1atomic.html#ab665e3014e2a805624227350699f141a">fourdst::atomic::He_4</a>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp(species);</div>
<div class="line">comp.setMolarAbundance(species, {1.0, 0.5});</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Since this method does not need to validate the species exists in the database, it will generally be slightly more performant than the symbol-based method. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00582">582</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a49b06737a50df9c25a234499a1431388" name="a49b06737a50df9c25a234499a1431388"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49b06737a50df9c25a234499a1431388">&#9670;&#160;</a></span>setMolarAbundance() <span class="overload">[3/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::setMolarAbundance </td>
<td>(</td>
<td class="paramtype">const std::set&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>molar_abundances</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the molar abundances for a set of symbols. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to set the molar abundances for. </td></tr>
<tr><td class="paramname">molar_abundances</td><td>The molar abundances to set.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if any symbol is not in the atomic species database. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if any symbol is not in the composition. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if any molar abundance is negative.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line">std::set&lt;std::string&gt; symbols = {<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>};</div>
<div class="line"><a class="code hl_class" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> comp(symbols);</div>
<div class="line">comp.setMolarAbundance(symbols, {1.0, 0.5});</div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00573">573</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a262d7133035d4e6f45daa81827abf5e7" name="a262d7133035d4e6f45daa81827abf5e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a262d7133035d4e6f45daa81827abf5e7">&#9670;&#160;</a></span>setMolarAbundance() <span class="overload">[4/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::setMolarAbundance </td>
<td>(</td>
<td class="paramtype">const std::string &amp;</td> <td class="paramname"><span class="paramname"><em>symbol</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double &amp;</td> <td class="paramname"><span class="paramname"><em>molar_abundance</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the molar abundance for a given symbol. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbol</td><td>The symbol to set the molar abundance for. </td></tr>
<tr><td class="paramname">molar_abundance</td><td>The molar abundance to set.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if the symbol is not in the atomic species database. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if the symbol is not in the composition. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if the molar abundance is negative.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp({<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>});</div>
<div class="line">comp.setMolarAbundance(<span class="stringliteral">&quot;H-1&quot;</span>, 1.0);</div>
<div class="line">comp.setMolarAbundance(<span class="stringliteral">&quot;He-4&quot;</span>, 0.5);</div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00529">529</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="ae908cda3a994292e2eb767fa476b666b" name="ae908cda3a994292e2eb767fa476b666b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae908cda3a994292e2eb767fa476b666b">&#9670;&#160;</a></span>setMolarAbundance() <span class="overload">[5/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::setMolarAbundance </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; <a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a> &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>species</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>molar_abundances</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the molar abundances for a list of isotopes. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">species</td><td>The isotopes to set the molar abundances for. </td></tr>
<tr><td class="paramname">molar_abundances</td><td>The molar abundances to set.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if any isotope is not registered in the composition. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if any molar abundance is negative.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><span class="preprocessor">#include &quot;fourdst/composition/species.h&quot;</span></div>
<div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp({<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a>, <a class="code hl_function" href="namespacefourdst_1_1atomic.html#ab665e3014e2a805624227350699f141a">fourdst::atomic::He_4</a>});</div>
<div class="line">comp.setMolarAbundance({<a class="code hl_function" href="namespacefourdst_1_1atomic.html#a6766bc834fd656df51bdcf22f7d97877">fourdst::atomic::H_1</a>, <a class="code hl_function" href="namespacefourdst_1_1atomic.html#ab665e3014e2a805624227350699f141a">fourdst::atomic::He_4</a>}, {1.0, 0.5});</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Since this method does not need to validate the species exists in the database, it will generally be slightly more performant than the symbol-based method. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00564">564</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a6baa22b92a78fd43d10d4941f30c8ac2" name="a6baa22b92a78fd43d10d4941f30c8ac2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6baa22b92a78fd43d10d4941f30c8ac2">&#9670;&#160;</a></span>setMolarAbundance() <span class="overload">[6/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fourdst::composition::Composition::setMolarAbundance </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; std::string &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>symbols</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::vector&lt; double &gt; &amp;</td> <td class="paramname"><span class="paramname"><em>molar_abundances</em></span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the molar abundances for a list of symbols. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>The symbols to set the molar abundances for. </td></tr>
<tr><td class="paramname">molar_abundances</td><td>The molar abundances to set.</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unknown_symbol_error.html" title="Exception thrown when an unknown symbol is encountered.">exceptions::UnknownSymbolError</a></td><td>if any symbol is not in the atomic species database. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_unregistered_symbol_error.html" title="Exception thrown when a symbol is used that has not been registered.">exceptions::UnregisteredSymbolError</a></td><td>if any symbol is not in the composition. </td></tr>
<tr><td class="paramname"><a class="el" href="classfourdst_1_1composition_1_1exceptions_1_1_invalid_composition_error.html" title="Exception thrown when a composition is in an invalid or inconsistent state.">exceptions::InvalidCompositionError</a></td><td>if any molar abundance is negative.</td></tr>
</table>
</dd>
</dl>
<dl class="section user"><dt>Example:</dt><dd><div class="fragment"><div class="line"><a class="code hl_function" href="#a23b83b76ee025f6fc009184ee19bba88">Composition</a> comp({<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>});</div>
<div class="line">comp.setMolarAbundance({<span class="stringliteral">&quot;H-1&quot;</span>, <span class="stringliteral">&quot;He-4&quot;</span>}, {1.0, 0.5});</div>
</div><!-- fragment --> </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00555">555</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<a id="a9d177d36b728442bcbd8cb66712c7c75" name="a9d177d36b728442bcbd8cb66712c7c75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d177d36b728442bcbd8cb66712c7c75">&#9670;&#160;</a></span>size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t fourdst::composition::Composition::size </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel nodiscard">nodiscard</span><span class="mlabel override">override</span><span class="mlabel virtual">virtual</span><span class="mlabel noexcept">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the number of registered species in the composition. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of registered species. </dd></dl>
<p>Implements <a class="el" href="class_composition_abstract.html#a230f58ef18a9816c1d13c287eaf3ba05">CompositionAbstract</a>.</p>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00525">525</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Friends And Related Symbol Documentation</h2>
<a id="a36c2525d21cd932065bb2bb30bc57fb4" name="a36c2525d21cd932065bb2bb30bc57fb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36c2525d21cd932065bb2bb30bc57fb4">&#9670;&#160;</a></span>operator&lt;&lt;</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::ostream &amp; operator&lt;&lt; </td>
<td>(</td>
<td class="paramtype">std::ostream &amp;</td> <td class="paramname"><span class="paramname"><em>os</em></span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a> &amp;</td> <td class="paramname"><span class="paramname"><em>composition</em></span>&#160;)</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel friend">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Overloaded output stream operator for <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">os</td><td>The output stream. </td></tr>
<tr><td class="paramname">composition</td><td>The <a class="el" href="classfourdst_1_1composition_1_1_composition.html" title="Manages a collection of chemical species and their abundances.">Composition</a> to output. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The output stream. </dd></dl>
<p class="definition">Definition at line <a class="el" href="composition_8cpp_source.html#l00593">593</a> of file <a class="el" href="composition_8cpp_source.html">composition.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a02cd9d9608da082a200fdfa86d14bf5d" name="a02cd9d9608da082a200fdfa86d14bf5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02cd9d9608da082a200fdfa86d14bf5d">&#9670;&#160;</a></span>m_cache</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfourdst_1_1composition_1_1_composition_1_1_composition_cache.html">CompositionCache</a> fourdst::composition::Composition::m_cache</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel mutable">mutable</span><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Cache for computed properties to avoid redundant calculations. </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00152">152</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="aa05a640e0ea80142682bf4ee30a93c7f" name="aa05a640e0ea80142682bf4ee30a93c7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa05a640e0ea80142682bf4ee30a93c7f">&#9670;&#160;</a></span>m_molarAbundances</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::map&lt;<a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>, double&gt; fourdst::composition::Composition::m_molarAbundances</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Map of species to their molar abundances. </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00150">150</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<a id="a452b0affb86dc971a96c80d01f4fcb2b" name="a452b0affb86dc971a96c80d01f4fcb2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a452b0affb86dc971a96c80d01f4fcb2b">&#9670;&#160;</a></span>m_registeredSpecies</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::set&lt;<a class="el" href="structfourdst_1_1atomic_1_1_species.html">atomic::Species</a>&gt; fourdst::composition::Composition::m_registeredSpecies</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set of registered species in the composition. </p>
<p class="definition">Definition at line <a class="el" href="composition_8h_source.html#l00149">149</a> of file <a class="el" href="composition_8h_source.html">composition.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/composition/include/fourdst/composition/<a class="el" href="composition_8h_source.html">composition.h</a></li>
<li>src/composition/lib/<a class="el" href="composition_8cpp_source.html">composition.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacefourdst.html">fourdst</a></li><li class="navelem"><a class="el" href="namespacefourdst_1_1composition.html">composition</a></li><li class="navelem"><a class="el" href="classfourdst_1_1composition_1_1_composition.html">Composition</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
</ul>
</div>
</body>
</html>