Thread overview | |||||
---|---|---|---|---|---|
|
January 13, 2012 [Issue 7287] New: std.container.BinaryHeap example fails | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=7287 Summary: std.container.BinaryHeap example fails Product: D Version: D2 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: mailme+d@nilsb.dyndns.org --- Comment #0 from Nils <mailme+d@nilsb.dyndns.org> 2012-01-12 21:52:21 PST --- The example from http://www.dlang.org/phobos/std_container#BinaryHeap fails: --- import std.algorithm, std.container; void main() { // Example from "Introduction to Algorithms" Cormen et al, p 146 int[] a = [ 4, 1, 3, 2, 16, 9, 10, 14, 8, 7 ]; auto h = heapify(a); // largest element assert(h.front == 16); // a has the heap property assert(equal(a, [ 16, 14, 10, 9, 8, 7, 4, 3, 2, 1 ])); } --- core.exception.AssertError@test(9): Assertion failure Tested with dmd 2.057 and 2.058head. Interestingly, the corresponding unit test in container.d differs slightly from the example (and passes). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 19, 2012 [Issue 7287] std.container.BinaryHeap example fails | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nils | http://d.puremagic.com/issues/show_bug.cgi?id=7287 SomeDude <lovelydear@mailmetrash.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lovelydear@mailmetrash.com OS/Version|Linux |All --- Comment #1 from SomeDude <lovelydear@mailmetrash.com> 2012-04-19 14:11:13 PDT --- Fails also on Win32 2.059 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
November 29, 2012 [Issue 7287] std.container.BinaryHeap example fails | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nils | http://d.puremagic.com/issues/show_bug.cgi?id=7287 Mariusz Gliwiński <alienballance@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alienballance@gmail.com --- Comment #2 from Mariusz Gliwiński <alienballance@gmail.com> 2012-11-28 16:42:50 PST --- same on dmd 2.060 (linux x64) http://dpaste.dzfl.pl/1bd35a26 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation