www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6515] New: Support for a basic BinaryHeap operation


           Summary: Support for a basic BinaryHeap operation
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc

--- Comment #0 from bearophile_hugs eml.cc 2011-08-16 14:42:17 PDT ---
I'd like to create an empty heap, and then add to it an arbitrary (and
statically unknown) number of items, keeping the heap invariant valid all the
time (this means the heap invariant is valid after each item is added to the
heap, so I am free to pop items in any moment). Is this possible with

If this is not possible then I think this is a common and really basic
operation that needs to be possible. If it's already possible, then I suggest
to add a little example to the std.container.BinaryHeap module docs that shows
how you do it.

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 16 2011