|
fourdst::libcomposition v2.3.1
Robust atomic species information library
|
Caches computed properties of the composition to avoid redundant calculations. More...
Public Member Functions | |
| void | clear () |
| Clears all cached values. | |
| bool | is_clear () const |
| Checks if the cache is clear (i.e., all cached values are empty). | |
Public Attributes | |
| std::optional< CanonicalComposition > | canonicalComp |
| Cached canonical composition data. | |
| std::optional< std::vector< double > > | massFractions |
| Cached vector of mass fractions. | |
| std::optional< std::vector< double > > | numberFractions |
| Cached vector of number fractions. | |
| std::optional< std::vector< double > > | molarAbundances |
| Cached vector of molar abundances. | |
| std::optional< std::vector< atomic::Species > > | sortedSpecies |
| Cached vector of sorted species (by mass). | |
| std::optional< std::vector< std::string > > | sortedSymbols |
| Cached vector of sorted species (by mass). | |
| std::optional< double > | Ye |
| Cached electron abundance. | |
| std::optional< std::size_t > | hash |
Caches computed properties of the composition to avoid redundant calculations.
This struct holds optional cached values for various computed properties of the composition, such as canonical composition, mass fractions, number fractions, molar abundances, sorted species, sorted symbols, and electron abundance. The cache can be cleared when the composition is modified.
Definition at line 111 of file composition.h.
|
inline |
Clears all cached values.
Definition at line 124 of file composition.h.
|
inlinenodiscard |
Checks if the cache is clear (i.e., all cached values are empty).
Definition at line 139 of file composition.h.
| std::optional<CanonicalComposition> fourdst::composition::Composition::CompositionCache::canonicalComp |
Cached canonical composition data.
Definition at line 112 of file composition.h.
| std::optional<std::size_t> fourdst::composition::Composition::CompositionCache::hash |
Definition at line 119 of file composition.h.
| std::optional<std::vector<double> > fourdst::composition::Composition::CompositionCache::massFractions |
Cached vector of mass fractions.
Definition at line 113 of file composition.h.
| std::optional<std::vector<double> > fourdst::composition::Composition::CompositionCache::molarAbundances |
Cached vector of molar abundances.
Definition at line 115 of file composition.h.
| std::optional<std::vector<double> > fourdst::composition::Composition::CompositionCache::numberFractions |
Cached vector of number fractions.
Definition at line 114 of file composition.h.
| std::optional<std::vector<atomic::Species> > fourdst::composition::Composition::CompositionCache::sortedSpecies |
Cached vector of sorted species (by mass).
Definition at line 116 of file composition.h.
| std::optional<std::vector<std::string> > fourdst::composition::Composition::CompositionCache::sortedSymbols |
Cached vector of sorted species (by mass).
Definition at line 117 of file composition.h.
| std::optional<double> fourdst::composition::Composition::CompositionCache::Ye |
Cached electron abundance.
Definition at line 118 of file composition.h.