a number of improvements - switched IRV's add_vote to tally_vote to make it consistent - added description and documentation to each method/time - fixed typo in README - added a new IRV test (which i'm not sure is wrong) but which was causing big problems on selectricity git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@49 1440c7f4-e209-0410-9a04-881b5eb134a8
>>>>>>>>>>>>>> This breaks the API. <<<<<<<<<<<<<<<<<<<<<<<<<< Refactored the commits added by Joe Slag to return the full lists of candidates. In Joe's code, the full list of candidates were associated with the vote objects which didn't make sense since they are really part of results. I've gone ahead and reimplented this. It does mean that the API has changed. In the old version, you would get a ranked list of candidates by using: vote_object.results You now get it by doing: result_object.ranked_candidates vote_object.result.ranked_candidates >>>>>>>>>>>>>> This breaks the API. <<<<<<<<<<<<<<<<<<<<<<<<<< git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@46 1440c7f4-e209-0410-9a04-881b5eb134a8
Created the list_defeats method in the CondorcetResult Class, so it hsould apply both to PureCondorcet and SSD votes. It helps in outputting a list of who beat whom, and by how much. It also stores ties. git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@40 1440c7f4-e209-0410-9a04-881b5eb134a8
Added matrix to condorcet to draw a table of winners vs losers. Also added "points" attr_readers and instance variables to BordaResults and PluralityResults so that they will be availabel directly from the result objects. git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@38 1440c7f4-e209-0410-9a04-881b5eb134a8
Fix problem with a [nil] result being taken as having a winner; add testcases git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@36 1440c7f4-e209-0410-9a04-881b5eb134a8
Add testcases for calling results to empty votes. TODO: IRV Logic has same bug git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@34 1440c7f4-e209-0410-9a04-881b5eb134a8
* Entire election aborts with InvalidVoteError when an invalid vote object is passed in. * Add testcase for checking InvalidVoteError is properly raised git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@31 1440c7f4-e209-0410-9a04-881b5eb134a8