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
Remove whitespace from election.rb that was generating a warning git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@39 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
* 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
Allow PluralityVote to accept non-string arguments. (I couldn't find any reason why that wasn't the case to begin with) git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@29 1440c7f4-e209-0410-9a04-881b5eb134a8
simplify access to full results - now available as voteobject.results, instead of voteobject.result.get_full_results. git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@22 1440c7f4-e209-0410-9a04-881b5eb134a8
#filter_out and PureCondorcet weren't getting along well for sparse elections git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@21 1440c7f4-e209-0410-9a04-881b5eb134a8
Added get_full_results method that returns a ranked list of candidates. At this time, only Condorcet votes collect the appropriate information. git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@16 1440c7f4-e209-0410-9a04-881b5eb134a8
Added list of changes submitted by Jeff Rose <jeff@rosejn.net>. This includes: * Rake based testing and gemmification. * Range based voting (untested). * A new TODO file. * Moving files around to have them RV work better as a library. Thanks Jeff! git-svn-id: svn://rubyforge.org/var/svn/rubyvote/trunk@11 1440c7f4-e209-0410-9a04-881b5eb134a8