2026-05-18 10:04:49 -04:00
<!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" / >
2026-06-12 10:49:27 -04:00
< title > fourdst::libcomposition: src/composition/include/fourdst/composition/utils/utils.h File Reference< / title >
2026-05-18 10:04:49 -04:00
< 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" >
2026-06-12 10:49:27 -04:00
< div id = "projectname" > fourdst::libcomposition< span id = "projectnumber" >   v2.4.9< / span >
2026-05-18 10:04:49 -04:00
< / 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& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
< / script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& 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& 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& dn=expat.txt MIT */
$(function(){initNavTree('utils_8h.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 = "#namespaces" > Namespaces< / a > |
< a href = "#func-members" > Functions< / a > < / div >
< div class = "headertitle" > < div class = "title" > utils.h File Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< div class = "textblock" > < code > #include " < a class = "el" href = "composition_8h_source.html" > fourdst/composition/composition.h< / a > " < / code > < br / >
< code > #include " < a class = "el" href = "atomic_species_8h_source.html" > fourdst/atomic/atomicSpecies.h< / a > " < / code > < br / >
< code > #include < vector> < / code > < br / >
2026-05-18 10:08:43 -04:00
< code > #include < optional> < / code > < br / >
< code > #include < string> < / code > < br / >
2026-05-18 10:04:49 -04:00
< / div > < div class = "textblock" > < div class = "dynheader" >
Include dependency graph for utils.h:< / div >
< div class = "dyncontent" >
2026-05-18 10:08:43 -04:00
< div class = "center" > < div class = "zoom" > < iframe scrolling = "no" frameborder = "0" src = "utils_8h__incl.svg" width = "100%" height = "600" > < p > < b > This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.< / b > < / p > < / iframe > < / div > < / div >
2026-05-18 10:04:49 -04:00
< / div >
< / div > < div class = "textblock" > < div class = "dynheader" >
This graph shows which files directly or indirectly include this file:< / div >
< div class = "dyncontent" >
2026-06-12 10:49:27 -04:00
< div class = "center" > < iframe scrolling = "no" frameborder = "0" src = "utils_8h__dep__incl.svg" width = "518" height = "155" > < p > < b > This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.< / b > < / p > < / iframe > < / div >
2026-05-18 10:04:49 -04:00
< / div >
< / div >
< p > < a href = "utils_8h_source.html" > Go to the source code of this file.< / a > < / p >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "namespaces" name = "namespaces" > < / a >
Namespaces< / h2 > < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > namespace   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst.html" > fourdst< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > namespace   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html" > fourdst::composition< / a > < / td > < / tr >
< tr class = "memdesc:namespacefourdst_1_1composition" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Utilities and types for representing and manipulating chemical compositions. < br / > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "func-members" name = "func-members" > < / a >
Functions< / h2 > < / td > < / tr >
< tr class = "memitem:aa90b1ef07d607c0c829bedccf381cf54" id = "r_aa90b1ef07d607c0c829bedccf381cf54" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" > Composition< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html#aa90b1ef07d607c0c829bedccf381cf54" > fourdst::composition::buildCompositionFromMassFractions< / a > (const std::vector< std::string > & symbols, const std::vector< double > & massFractions)< / td > < / tr >
< tr class = "memdesc:aa90b1ef07d607c0c829bedccf381cf54" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Build a < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" title = "Manages a collection of chemical species and their abundances." > Composition< / a > object from symbols and their corresponding mass fractions. < br / > < / td > < / tr >
< tr class = "separator:aa90b1ef07d607c0c829bedccf381cf54" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a39d4f84dfa85ddda3b9feb5dda1afc1e" id = "r_a39d4f84dfa85ddda3b9feb5dda1afc1e" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" > Composition< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html#a39d4f84dfa85ddda3b9feb5dda1afc1e" > fourdst::composition::buildCompositionFromMassFractions< / a > (const std::vector< < a class = "el" href = "structfourdst_1_1atomic_1_1_species.html" > atomic::Species< / a > > & species, const std::vector< double > & massFractions)< / td > < / tr >
< tr class = "memdesc:a39d4f84dfa85ddda3b9feb5dda1afc1e" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Build a < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" title = "Manages a collection of chemical species and their abundances." > Composition< / a > object from species and their corresponding mass fractions. < br / > < / td > < / tr >
< tr class = "separator:a39d4f84dfa85ddda3b9feb5dda1afc1e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a2cb98194b465f646973ceba38d0e7d95" id = "r_a2cb98194b465f646973ceba38d0e7d95" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" > Composition< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html#a2cb98194b465f646973ceba38d0e7d95" > fourdst::composition::buildCompositionFromMassFractions< / a > (const std::set< < a class = "el" href = "structfourdst_1_1atomic_1_1_species.html" > atomic::Species< / a > > & species, const std::vector< double > & massFractions)< / td > < / tr >
< tr class = "memdesc:a2cb98194b465f646973ceba38d0e7d95" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Build a < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" title = "Manages a collection of chemical species and their abundances." > Composition< / a > object from species in a set and their corresponding mass fractions. < br / > < / td > < / tr >
< tr class = "separator:a2cb98194b465f646973ceba38d0e7d95" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2026-05-18 10:08:43 -04:00
< tr class = "memitem:ada2fea5f3ac5cff3ecd67541a0a094fc" id = "r_ada2fea5f3ac5cff3ecd67541a0a094fc" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" > Composition< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html#ada2fea5f3ac5cff3ecd67541a0a094fc" > fourdst::composition::buildCompositionFromMassFractions< / a > (const std::unordered_map< < a class = "el" href = "structfourdst_1_1atomic_1_1_species.html" > atomic::Species< / a > , double > & massFractionsMap)< / td > < / tr >
< tr class = "memdesc:ada2fea5f3ac5cff3ecd67541a0a094fc" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Build a < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" title = "Manages a collection of chemical species and their abundances." > Composition< / a > object from a map of species to mass fractions. < br / > < / td > < / tr >
< tr class = "separator:ada2fea5f3ac5cff3ecd67541a0a094fc" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:abf844ad6e10524bf99fc3bf6c9d68465" id = "r_abf844ad6e10524bf99fc3bf6c9d68465" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" > Composition< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html#abf844ad6e10524bf99fc3bf6c9d68465" > fourdst::composition::buildCompositionFromMassFractions< / a > (const std::unordered_map< std::string, double > & massFractions)< / td > < / tr >
< tr class = "memdesc:abf844ad6e10524bf99fc3bf6c9d68465" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Build a < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" title = "Manages a collection of chemical species and their abundances." > Composition< / a > object from a map of species to mass fractions. < br / > < / td > < / tr >
< tr class = "separator:abf844ad6e10524bf99fc3bf6c9d68465" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8163289e584a05b4075c775279761e55" id = "r_a8163289e584a05b4075c775279761e55" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" > Composition< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html#a8163289e584a05b4075c775279761e55" > fourdst::composition::buildCompositionFromMassFractions< / a > (std::map< < a class = "el" href = "structfourdst_1_1atomic_1_1_species.html" > atomic::Species< / a > , double > massFractions)< / td > < / tr >
< tr class = "memdesc:a8163289e584a05b4075c775279761e55" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Build a < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" title = "Manages a collection of chemical species and their abundances." > Composition< / a > object from a map of species to mass fractions. < br / > < / td > < / tr >
< tr class = "separator:a8163289e584a05b4075c775279761e55" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:abd0e185f7fd52130f36414faf2dc07d7" id = "r_abd0e185f7fd52130f36414faf2dc07d7" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" > Composition< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html#abd0e185f7fd52130f36414faf2dc07d7" > fourdst::composition::buildCompositionFromMassFractions< / a > (std::map< std::string, double > massFractions)< / td > < / tr >
< tr class = "memdesc:abd0e185f7fd52130f36414faf2dc07d7" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Build a < a class = "el" href = "classfourdst_1_1composition_1_1_composition.html" title = "Manages a collection of chemical species and their abundances." > Composition< / a > object from a map of species to mass fractions. < br / > < / td > < / tr >
< tr class = "separator:abd0e185f7fd52130f36414faf2dc07d7" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:adcc2e4ca25ab7b93983730fc78f4deea" id = "r_adcc2e4ca25ab7b93983730fc78f4deea" > < td class = "memItemLeft" align = "right" valign = "top" > std::optional< < a class = "el" href = "structfourdst_1_1atomic_1_1_species.html" > fourdst::atomic::Species< / a > >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "namespacefourdst_1_1composition.html#adcc2e4ca25ab7b93983730fc78f4deea" > fourdst::composition::getSpecies< / a > (const std::string & symbol)< / td > < / tr >
< tr class = "separator:adcc2e4ca25ab7b93983730fc78f4deea" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2026-05-18 10:04:49 -04:00
< / table >
< / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
2026-06-12 10:49:27 -04:00
< li class = "navelem" > < a class = "el" href = "dir_68267d1309a1af8e8297ef4c3efbcdba.html" > src< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_425afc2e69e55565110382214454a15b.html" > composition< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_cb6fc2f7165eff3b2362b2440dfaea8e.html" > include< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_3c9efac6790a3720e63e1a08c00d11f2.html" > fourdst< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_f0fdd83dd0cb4aa6fd6a832374ae4f05.html" > composition< / a > < / li > < li class = "navelem" > < a class = "el" href = "dir_d6630bab6c58db28bc1f1c304498b57d.html" > utils< / a > < / li > < li class = "navelem" > < a class = "el" href = "utils_8h.html" > utils.h< / a > < / li >
2026-05-18 10:04:49 -04:00
< 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 >