added static method to Hive class to remove nodes which are connected in
the network, ie. not in the list of edges.