Sorry for the length and number of changes here, but I was finding the BallotGraph object to not really be working as intended. High level summary of changes:
Change complete parameter to allow_partial in __init__. If allow_partial is True, BallotGraph constructs all possible ballot types. If False, it only generates full linear orderings.
Add show_cast parameter to draw. This only displays nodes of the graph that have the cast attribute equal to True.
Added/replaced necessary test functions.
Changed node_data to node_weights since that is the only kind of data it was storing.
Sorry for the length and number of changes here, but I was finding the
BallotGraph
object to not really be working as intended. High level summary of changes:complete
parameter toallow_partial
in__init__
. Ifallow_partial
is True, BallotGraph constructs all possible ballot types. If False, it only generates full linear orderings.show_cast
parameter todraw
. This only displays nodes of the graph that have thecast
attribute equal to True.node_data
tonode_weights
since that is the only kind of data it was storing.@jamesturk @drdeford @jgibson517 @jennjwang @ziglaser