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 fix_short parameter to __init__. Gives the user the option to change ballots of length n-1 to n.
Add several parameters to draw. to_display lets the user specify a boolean function on nodes to be drawn. neighborhoods and show_cast are parameters that give common display functions.
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.fix_short
parameter to__init__
. Gives the user the option to change ballots of length n-1 to n.draw
.to_display
lets the user specify a boolean function on nodes to be drawn.neighborhoods
andshow_cast
are parameters that give common display functions.@jamesturk @drdeford @jgibson517 @jennjwang @ziglaser