def initialize(voteobj=nil)
unless voteobj and voteobj.kind_of?( CondorcetVote )
raise ArgumentError, "You must pass a CondorcetVote array.", caller
end
super(voteobj)
def initialize(voteobj=nil)
unless voteobj and voteobj.kind_of?( CondorcetVote )
raise ArgumentError, "You must pass a CondorcetVote array.", caller
end
super(voteobj)
def defeats(candidates=nil, votes=nil)
candidates = @election.candidates unless candidates
votes = @election.votes unless votes
def defeats(candidates=nil, votes=nil)
candidates = @election.candidates unless candidates
votes = @election.votes unless votes
def in_schwartz_set?(candidate, candidates, transitive_defeats)
candidates.each do |challenger|
next if candidate == challenger
def in_schwartz_set?(candidate, candidates, transitive_defeats)
candidates.each do |challenger|
next if candidate == challenger