Skip to content

Matching algorithms, currently implements Gale-Shapley proposal alg

Notifications You must be signed in to change notification settings

chasestarr/match

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

GoDoc

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"
}

About

Matching algorithms, currently implements Gale-Shapley proposal alg

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages