We hardly networkx. It is only used as an underlying graph representation for the networks, FactorTrees and it provides a useful helper for sampling.
Functionality we would need to implement in order to drop networkx:
[ ] Representing graph structure (potentially with variables for FactorTree) (used in network.py and inference/exact.py)
[ ] Topological sort for sampling (used in network.py)
[ ] Directed to undirected graph for FactorTree (used in inference/order.py and inference/exact.py)
Our own implementation could either be general (e.g. take required parts from networkx almost as they are, but simplified for our needs), or specialized and optimized for our use case (e.g. flag nodes without ancestors specially for topological sort)
We hardly networkx. It is only used as an underlying graph representation for the networks, FactorTrees and it provides a useful helper for sampling.
Functionality we would need to implement in order to drop networkx:
Our own implementation could either be general (e.g. take required parts from networkx almost as they are, but simplified for our needs), or specialized and optimized for our use case (e.g. flag nodes without ancestors specially for topological sort)
Did I forget any other functions we use?