munkres

package module
v0.0.0-...-f2f202d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

README

munkres

An implementation of the Hungarian algorithm

This code is heavily based on Bob Pilgrim's work outlined here.

License

see LICENSE file

Author(s)

Original: Brian Fallik - bfallik at clypd.com
Forked Version: Andrew Lockwood

Dependencies

None. I nuked the tests (for now and probably ever which is terrble. I'm sorry)

Development

Pull requests welcome! Comments and feedback welcome!

Other

Thanks to clypd for agreeing to release this code into the wild.
Thanks to Brian Fallik for doing this.
No thanks to the terrible non-functional go-gt lib >:(

clypd

Documentation

Index

Constants

View Source
const (
	Unset mark = iota
	Starred
	Primed
)

Munkres Code

Variables

This section is empty.

Functions

func GetMunkresMinScore

func GetMunkresMinScore(m *FloatMatrix) float64

GetMunkresMinScore returns the sum of the elements that comprise the lowest cost path

Types

type FloatMatrix

type FloatMatrix struct {
	N int64
	A []float64
}

FloatMatrix Code

func NewMatrix

func NewMatrix(n int64) (m *FloatMatrix)

NewMatrix will return a pointer to a new FloatMatrix

func (FloatMatrix) GetElement

func (m FloatMatrix) GetElement(i int64, j int64) float64

GetElement will return the element of the matrix at position (i,j)

func (*FloatMatrix) Print

func (m *FloatMatrix) Print()

Print prints all elements of the matrix

func (FloatMatrix) SetElement

func (m FloatMatrix) SetElement(i int64, j int64, v float64)

SetElement will set the element of the matrix at position (i,j)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL