alexhutman / zftools

Calculates the Zero Forcing Number (and Zero Forcing Set) in Sage (Cython)
https://pypi.org/project/zftools/
GNU General Public License v3.0
5 stars 0 forks source link

Namespace reorganization #8

Open ldeaett opened 2 months ago

ldeaett commented 2 months ago

There has been some discussion of where the zero_forcing_set() and zero_forcing_number() functions should live. Pull request #7 would add those to the metagraph module, and this might even make sense, since that particular metagraph implementation is specific to ordinary zero forcing. But for the sake of computing other forcing variants in the (hopefully near) future, we should probably move the dijkstra() function into its own module. We could then – if we want – move zero_forcing_set() and zero_forcing_number() into that module as well. I'm not sure what we should call it. Maybe just zeroforcing? Or perhaps zero_forcing_tools? Presumably, we'd want this to be the one module that end users actually import.

ldeaett commented 1 week ago

I'm now thinking that the “helper functions” zero_forcing_set() and zero_forcing_number() and their ilk belong in some separate module like just zeroforcing.py while dijkstra() is a static method to the (abstract) metagraph class. The helper functions are then responsible for figuring out which type of metagraph to instantiate, and then for calling dijkstra() on that.

alexhutman commented 1 week ago

Makes sense to me!