diff --git a/include/fractal.hpp b/include/fractal.hpp index 6e5e75f..db5c5bc 100644 --- a/include/fractal.hpp +++ b/include/fractal.hpp @@ -100,7 +100,10 @@ private: etl::vector m_branch_rules; + group_id_t m_axiom = 0; + public: + /** * @brief Checks if the maximum number of tokens has been reached * @@ -219,6 +222,14 @@ public: */ branch_rule_id_t add_branch_rule_weighted(token_id_t match, weighted_group_id_t wgroup); + /** @brief Sets the axiom + * + * @exception @c mtl::invalid_argument if an invalid group ID was supplied + */ + void set_axiom(group_id_t axiom) { + m_axiom = valid_group_characteristic(axiom) ? axiom : throw mtl::invalid_argument(); + } + group_id_t get_axiom() const { return m_axiom; } };