When a Neet network has a single node that is disconnected from the rest of the network, the Network.network_graph method fails to include it in the networkx.DiGraph. This is because we are using the networkx.DiGraph(edges) initializer which only includes if they are an endpoint of one of the edges provided.
Neet Version: 1.0.0
Operating System: ChromeOS 79
To Reproduce
Describe the steps to reproduce the bug, and include a script if possible.
Create a LogicNetwork with a three nodes, two connected and one free
Convert to a networkx.DiGraph with Network.network_graph
Confirm that there are 3 nodes in the LogicNetwork and only 2 in the the networkx.DiGraph
Description
When a Neet network has a single node that is disconnected from the rest of the network, the
Network.network_graph
method fails to include it in thenetworkx.DiGraph
. This is because we are using thenetworkx.DiGraph(edges)
initializer which only includes if they are an endpoint of one of the edges provided.Neet Version: 1.0.0 Operating System: ChromeOS 79
To Reproduce
Describe the steps to reproduce the bug, and include a script if possible.
LogicNetwork
with a three nodes, two connected and one freenetworkx.DiGraph
withNetwork.network_graph
LogicNetwork
and only 2 in the thenetworkx.DiGraph
Expected Behavior
The number of nodes in the resulting
DiGraph
should be the same as the number of nodes in the network.Actual Behavior
Lone nodes are discarded.