Documentation
¶
Overview ¶
data types and algorithms
Index ¶
- func AllEmpty(groups []*Group) bool
- func FromJSON(encoded []byte) (groups []*Group, persons []*Person, err error)
- func InsertPersonIntoFullGroup(p *Person, g *Group) bool
- func PersonInNoGroup(person *Person, groups []*Group) bool
- func Shuffle(a []*Person)
- func Sort(s []*Person)
- func ToJSON(groups []*Group, persons []*Person) ([]byte, error)
- type Combination
- type Group
- type Matcher
- type Part
- type Person
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertPersonIntoFullGroup ¶
insert person into a full group while kicking out others and still keeping the score as high as possible
func PersonInNoGroup ¶
Types ¶
type Combination ¶
type Group ¶
func (*Group) StringWithSize ¶
type Matcher ¶
func NewMatcher ¶
func (*Matcher) CalcQuote ¶
calculate the average preference number every person got and the wish fulfilling quote in percent
func (*Matcher) CheckMatcher ¶
checks the matcher for correctness in matter of total, but also group specific person amount
func (*Matcher) MatchManyAndTakeBest ¶
func (m *Matcher) MatchManyAndTakeBest(n int, hardTimeout time.Duration, softTimeout time.Duration) error
Simple helper function to try out many solutions and get the best
func (*Matcher) SmartMatch ¶
Click to show internal directories.
Click to hide internal directories.