Skip to content
Snippets Groups Projects
Commit cad94107 authored by Mohamed Fall's avatar Mohamed Fall
Browse files

fix copeland

parent b1b0da05
No related branches found
No related tags found
No related merge requests found
package comsoc
func CopelandSWF(p Profile) (count Count, err error) {
count = make(map[Alternative]int)
firstProfile := p[0]
// Generate every combination of two different alternatives.
for _, couple := range generateCouples(firstProfile) {
......
package comsoc
func MajoritySWF(p Profile) (count Count, err error) {
count = Count(make(map[Alternative]int))
count = make(map[Alternative]int)
for _, alts := range p {
count[alts[0]] += 1
} // 0-votes alternatives are not included
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment