This repository was archived by the owner on May 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
This repository was archived by the owner on May 24, 2025. It is now read-only.
filtergraph.py filtering is nondeterministic #26
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
(includegraph) nots@bedlam ~/Documents/includegraph (ag/filter) $ ./filtergraph.py -i foo.tgf -f '*bar*' >/dev/null
2022-07-26 13:36:09,880 - filtergraph - INFO - Parsed 1123 nodes
2022-07-26 13:36:09,880 - filtergraph - INFO - Filtering graph...
2022-07-26 13:36:09,906 - filtergraph - INFO - Removed 798 nodes
(includegraph) nots@bedlam ~/Documents/includegraph (ag/filter) $ ./filtergraph.py -i foo.tgf -f '*bar*' >/dev/null
2022-07-26 13:36:30,296 - filtergraph - INFO - Parsed 1123 nodes
2022-07-26 13:36:30,296 - filtergraph - INFO - Filtering graph...
2022-07-26 13:36:30,322 - filtergraph - INFO - Removed 829 nodes
(includegraph) nots@bedlam ~/Documents/includegraph (ag/filter) $ ./filtergraph.py -i foo.tgf -f '*bar*' >/dev/null
2022-07-26 13:36:49,054 - filtergraph - INFO - Parsed 1123 nodes
2022-07-26 13:36:49,054 - filtergraph - INFO - Filtering graph...
2022-07-26 13:36:49,079 - filtergraph - INFO - Removed 819 nodes
(includegraph) nots@bedlam ~/Documents/includegraph (ag/filter) $ ./filtergraph.py -i foo.tgf -f '*bar*' >/dev/null
2022-07-26 13:36:50,459 - filtergraph - INFO - Parsed 1123 nodes
2022-07-26 13:36:50,459 - filtergraph - INFO - Filtering graph...
2022-07-26 13:36:50,483 - filtergraph - INFO - Removed 833 nodes
(includegraph) nots@bedlam ~/Documents/includegraph (ag/filter) $ ./filtergraph.py -i foo.tgf -f '*bar*' >/dev/null
2022-07-26 13:36:51,887 - filtergraph - INFO - Parsed 1123 nodes
2022-07-26 13:36:51,887 - filtergraph - INFO - Filtering graph...
2022-07-26 13:36:51,912 - filtergraph - INFO - Removed 824 nodes
This is because set iteration order is nondeterministic, so each BFS searches starting at a random node.
But even with random iteration order, the number of nodes filtered should be the same.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working