10#include <unordered_map>
Abstract base class for chemical composition representations.
double getMolarAbundance(const std::string &symbol) const override
Get the molar abundance for a given symbol.
const std::vector< atomic::Species > & getRegisteredSpecies() const noexcept override
Get all registered atomic species in the composition.
double getNumberFraction(const std::string &symbol) const override
Get the number fraction for a given symbol.
CompositionDecorator(std::unique_ptr< CompositionAbstract > decorator)
detail::CompositionIterator< true > begin() const override
double getMassFraction(const atomic::Species &species) const override
Get the mass fraction for a given species.
detail::CompositionIterator< false > begin() override
double getElectronAbundance() const noexcept override
Get the electron abundance of the composition.
double getMeanParticleMass() const noexcept override
Get the mean particle mass of the composition.
std::vector< double > getMassFractionVector() const noexcept override
Get the mass fraction as a vector.
double getMassFraction(const std::string &symbol) const override
Get the mass fraction for a given symbol.
detail::CompositionIterator< true > end() const override
double getMolarAbundance(const atomic::Species &species) const override
Get the molar abundance for a given species.
std::unordered_map< atomic::Species, double > getNumberFraction() const noexcept override
Get the number fraction for all registered symbols.
std::vector< double > getNumberFractionVector() const noexcept override
Get the number fraction as a vector.
std::unique_ptr< CompositionAbstract > m_base_composition
std::vector< double > getMolarAbundanceVector() const noexcept override
Get the molar abundance as a vector.
bool contains(const atomic::Species &species) const noexcept override
Check if the composition contains the given species.
std::set< std::string > getRegisteredSymbols() const noexcept override
Get all registered chemical symbols in the composition.
std::unordered_map< atomic::Species, double > getMassFraction() const noexcept override
Get the mass fraction for all registered symbols.
double getNumberFraction(const atomic::Species &species) const override
Get the number fraction for a given species.
atomic::Species getSpeciesAtIndex(const size_t index) const override
Get the species at a given index.
size_t getSpeciesIndex(const std::string &symbol) const override
Get the index of a species by symbol.
detail::CompositionIterator< false > end() override
size_t getSpeciesIndex(const atomic::Species &species) const override
Get the index of a species.
bool contains(const std::string &symbol) const override
Check if the composition contains the given species.
size_t size() const noexcept override
Utilities and types for representing and manipulating chemical compositions.
Represents an atomic species (isotope) with its fundamental physical properties.