simultechnology / go-gt

Automatically exported from code.google.com/p/go-gt
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

panic from Hungarian() #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a 4x4 matrix
  397, 392, 170, 1,
  757, 116, 461, 3,
  439, 1, 1, 242,
  1, 219, 2, 3,
2. pass it into gt.Hungarian() 

What is the expected output? What do you see instead?

I did not expect a panic. Instead I saw:

runtime.panic(0x2f56e0, 0x6d8437)
    /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
testing.func·005()
    /usr/local/go/src/pkg/testing/testing.go:385 +0xe8
runtime.panic(0x2f56e0, 0x6d8437)
    /usr/local/go/src/pkg/runtime/panic.c:248 +0x106
code.google.com/p/go-gt/gt.(*env).augment(0xc21005a4b0)
    /Users/bfallik/sandbox/gillnet/go/src/code.google.com/p/go-gt/gt/hungarian.go:134 +0x71d
code.google.com/p/go-gt/gt.(*env).augment(0xc21005a4b0)
    /Users/bfallik/sandbox/gillnet/go/src/code.google.com/p/go-gt/gt/hungarian.go:155 +0x4a3
code.google.com/p/go-gt/gt.Hungarian(0xc2100760c0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/bfallik/sandbox/gillnet/go/src/code.google.com/p/go-gt/gt/hungarian.go:175 +0x75
ade.Test_Crap(0xc21004d240)
    /Users/bfallik/sandbox/gillnet/go/src/ade/assignment_test.go:91 +0x2ba
testing.tRunner(0xc21004d240, 0x6d9c30)
    /usr/local/go/src/pkg/testing/testing.go:391 +0x8b
created by testing.RunTests
    /usr/local/go/src/pkg/testing/testing.go:471 +0x8b2

What version of the product are you using? On what operating system?

$ hg identify
5b73e8f5be84 tip

I'm running on OSX.

Please provide any additional information below.

Original issue reported on code.google.com by br...@clypd.com on 14 Feb 2014 at 3:48

GoogleCodeExporter commented 8 years ago
I've published my own implementation of this algorithm which doesn't exhibit 
the same panic()s. It's available here: https://github.com/clyphub/munkres.

Original comment by br...@clypd.com on 17 Mar 2014 at 2:32