lib/vote/condorcet/schulze/basic.rb
def calculate_beat_couples
          return if @calculated_beat_couples

          ranking.each_with_index do |_val, idx|
            ranking.each_with_index do |_val2, idx2|
              next if idx == idx2
              next @beat_couples << [idx, idx2] if play_matrix[idx, idx2] > play_matrix[idx2, idx]
              calculate_ties(idx, idx2)
            end
          end
          @calculated_beat_couples = true
        end
# calculates @beat_couples and @ties in roder to display results afterward
calculates @beat_couples and @ties in roder to display results afterward
calculates @beat_couples and @ties in roder to display results afterward
def calculate_beat_couples
          return if @calculated_beat_couples
          ranking.each_with_index do |_val, idx|
            ranking.each_with_index do |_val2, idx2|
              next if idx == idx2
              next @beat_couples << [idx, idx2] if play_matrix[idx, idx2] > play_matrix[idx2, idx]
              calculate_ties(idx, idx2)
            end
          end
          @calculated_beat_couples = true
        end
def calculate_beat_couples return if @calculated_beat_couples ranking . each_with_index do | _val , idx | ranking . each_with_index do | _val2 , idx2 | next if idx == idx2 next @beat_couples << [ idx , idx2 ] if play_matrix [ idx , idx2 ] > play_matrix [ idx2 , idx ] calculate_ties ( idx , idx2 ) end end @calculated_beat_couples = true end
calculates @beat_couples and @ties in roder to display results afterward
calculates @beat_couples and @ties in roder to display results afterward