Closed nawtrey closed 2 weeks ago
It looks like this was partially addressed in commit 1db2203
(I've checked off the first task to reflect this).
While some checks were added to existing tests (3-state, 4-state, 4-state leakage, 5-state leakage, 6-state) I think it would be good to create a dedicated test for this that covers more complex models, and checks both partial diagram and directional diagram counts, since they rely on different algorithms to generate them.
This may warrant a new issue, but it looks like this has been implemented upstream in networkx
(see here). I think once the KDA API is in a better state we will remove our version of this and just add a method that calls the networkx
version.
I think I will close this. We already have a test test_diagram_counts
that verifies the number of partial and directional diagrams for 5 different test models. If we think this is not thorough enough we can reopen later.
Description
There is currently a test which verifies the correct number of partial and directional diagrams are generated for maximally-connected graphs of various sizes, but this can be expanded to include graphs of arbitrary complexity using Kirchhoff's Theorem. The paper that inspired this can be found here. This is important because we currently only test edge cases, but it would be better to include many of the graphs we use throughout our tests and analysis. Some of this is discussed in #22.
TODO
graph_utils.py
~diagrams.py
which calculates any cofactor of the Laplacian matrix for an input graph and outputs the number of spanning trees (partial diagrams) for that graph