lib/vote/condorcet/schulze/classifications.rb
def classification_with_ties
          result = []
          result << @schulze_basic.potential_winners # add potential winners on first place
          result += @schulze_basic.ties.clone.sort_by { |tie| -@schulze_basic.ranking[tie[0]] } # add ties by ranking
          result.uniq! # remove duplicates (potential winners are also ties)
          add_excludeds(result)
        end
# compute the final classification with ties included
# the result is an array of arrays. each position can contain one or more elements in tie
# e.g. [[0,1], [2,3], [4], [5]]
compute the final classification with ties included
the result is an array of arrays. each position can contain one or more elements in tie
e.g.
compute the final classification with ties included the result is an array of arrays . each position can contain one or more elements in tie e . g .
def classification_with_ties
          result = []
          result << @schulze_basic.potential_winners 
          result += @schulze_basic.ties.clone.sort_by { |tie| -@schulze_basic.ranking[tie[0]] } 
          result.uniq! 
          add_excludeds(result)
        end
def classification_with_ties result = [ ] result << @schulze_basic . potential_winners result += @schulze_basic . ties . clone . sort_by { | tie | - @schulze_basic . ranking [ tie [ 0 ] ] } result . uniq! add_excludeds ( result ) end
compute the final classification with ties included
the result is an array of arrays.
compute the final classification with ties included the result is an array of arrays .
# add potential winners on first place # add ties by ranking # remove duplicates (potential winners are also ties)