import (
"fmt"
"github.com/chasestarr/match"
)
func main() {
alex := match.Person{name: "Bradley"}
bradley := match.Person{name: "Bradley"}
christina := match.Person{name: "Christina"}
dolores := match.Person{name: "Dolores"}
alex.candidates = []string{"Dolores", "Bradley"}
bradley.candidates = []string{"Christina", "Dorlores"}
christina.candidates = []string{"Alex", "Bradley"}
dolores.candidates = []string{"Bradley", "Alex"}
a := []Person{alex, bradley}
b := []Person{christina, dolores}
matches := match.GaleShapley(a, b)
fmt.Println(matches) // "Alex" --> "Dolores", "Bradley" --> "Christina"
}
-
Notifications
You must be signed in to change notification settings - Fork 0
chasestarr/match
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Matching algorithms, currently implements Gale-Shapley proposal alg
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published