+
+ def victories_and_ties
+ victories_ties = {}
+ candidates = @matrix.keys.sort
+
+ candidates.each do |candidate|
+ candidates.each do |challenger|
+ next if candidate == challenger
+ diff = @matrix[candidate][challenger] - @matrix[challenger][candidate]
+ victories_ties[candidate] = {} unless victories_ties.key?(candidate)
+ if diff >= 0
+ victories_ties[candidate][challenger] = diff
+ end
+ end
+ end
+
+ return victories_ties
+ end
+
+ def ranked_candidates
+ if not defined?(@ranked_candidates)
+ @ranked_candidates = build_ranked_candidates()
+ end