|
GridFire 0.0.1a
General Purpose Nuclear Network
|
A collection of LogicalReaction objects. More...
#include <reaction.h>
Public Member Functions | |
| LogicalReactionSet ()=delete | |
| Deleted default constructor. | |
| LogicalReactionSet (const ReactionSet &reactionSet) | |
| Constructs a LogicalReactionSet from a ReactionSet. | |
| size_t | size () const |
| Gets the number of logical reactions in the set. | |
| const LogicalReaction & | operator[] (size_t index) const |
| Accesses a logical reaction by its index. | |
Iterators | |
Provides iterators to loop over the logical reactions in the set. | |
| auto | begin () |
| auto | begin () const |
| auto | end () |
| auto | end () const |
Public Member Functions inherited from gridfire::reaction::ReactionSet | |
| ReactionSet (std::vector< Reaction > reactions) | |
| Constructs a ReactionSet from a vector of reactions. | |
| ReactionSet (const ReactionSet &other) | |
| Copy constructor. | |
| ReactionSet & | operator= (const ReactionSet &other) |
| Copy assignment operator. | |
| virtual | ~ReactionSet ()=default |
| Virtual destructor. | |
| virtual void | add_reaction (Reaction reaction) |
| Adds a reaction to the set. | |
| virtual void | remove_reaction (const Reaction &reaction) |
| Removes a reaction from the set. | |
| bool | contains (const std::string_view &id) const |
| Checks if the set contains a reaction with the given ID. | |
| bool | contains (const Reaction &reaction) const |
| Checks if the set contains the given reaction. | |
| void | clear () |
| Removes all reactions from the set. | |
| bool | contains_species (const fourdst::atomic::Species &species) const |
| Checks if any reaction in the set involves the given species. | |
| bool | contains_reactant (const fourdst::atomic::Species &species) const |
| Checks if any reaction in the set contains the given species as a reactant. | |
| bool | contains_product (const fourdst::atomic::Species &species) const |
| Checks if any reaction in the set contains the given species as a product. | |
| const Reaction & | operator[] (const std::string_view &id) const |
| Accesses a reaction by its ID. | |
| bool | operator== (const ReactionSet &other) const |
| Compares this set with another for equality. | |
| bool | operator!= (const ReactionSet &other) const |
| Compares this set with another for inequality. | |
| uint64_t | hash (uint64_t seed=0) const |
| Computes a hash for the entire set. | |
| auto | begin () |
| auto | begin () const |
| auto | end () |
| auto | end () const |
Private Attributes | |
| quill::Logger * | m_logger = fourdst::logging::LogManager::getInstance().getLogger("log") |
| std::vector< LogicalReaction > | m_reactions |
| std::string | m_id |
| std::unordered_map< std::string, LogicalReaction > | m_reactionNameMap |
| Maps reaction IDs to LogicalReaction objects for quick lookup. | |
A collection of LogicalReaction objects.
This class takes a ReactionSet and groups individual Reaction objects into LogicalReaction objects based on their peName. This provides a view of the network where all rates for the same physical process are combined.
Definition at line 554 of file reaction.h.
|
delete |
Deleted default constructor.
|
explicit |
Constructs a LogicalReactionSet from a ReactionSet.
| reactionSet | The set of individual reactions to group. |
This constructor iterates through the provided ReactionSet, groups reactions by their peName, and creates a LogicalReaction for each group.
Definition at line 347 of file reaction.cpp.
|
inline |
Definition at line 573 of file reaction.h.
|
inlinenodiscard |
Definition at line 574 of file reaction.h.
|
inline |
Definition at line 575 of file reaction.h.
|
inlinenodiscard |
Definition at line 576 of file reaction.h.
|
inlinenodiscardvirtual |
Accesses a logical reaction by its index.
| index | The index of the logical reaction. |
Reimplemented from gridfire::reaction::ReactionSet.
Definition at line 590 of file reaction.h.
|
inlinenodiscardvirtual |
Gets the number of logical reactions in the set.
Reimplemented from gridfire::reaction::ReactionSet.
Definition at line 583 of file reaction.h.
|
private |
Definition at line 594 of file reaction.h.
|
private |
Definition at line 592 of file reaction.h.
|
private |
Maps reaction IDs to LogicalReaction objects for quick lookup.
Definition at line 595 of file reaction.h.
|
private |
Definition at line 593 of file reaction.h.