Re: [collections] BinaryHeap and PriorityQueue

2004-01-02 Thread scolebourne
> from:Phil Steitz <[EMAIL PROTECTED]> > > I was also looking at the heap impl and wondering if the compare method > > could check for ascendingOrder, then removing the need for near duplicate > > methods (one for minHeap, one for maxHeap) elsewhere. Would this be a good > > change? > > That

Re: [collections] BinaryHeap and PriorityQueue

2004-01-01 Thread Phil Steitz
Stephen Colebourne wrote: From: "Phil Steitz" <[EMAIL PROTECTED]> Stephen Colebourne wrote: > Given a choice I would deprecate PQ altogether. That would make things simpler. If no one else comments, I'll do this. I am +1 on renaming to PriorityBuffer. Done I was also looking at the heap impl an

Re: [collections] BinaryHeap and PriorityQueue

2004-01-01 Thread Phil Steitz
Stephen Colebourne wrote: I am happy for Buffer to exist in [collections] (although I wish the methods were peek and pop) Yeah. Like a queue ;-). > Given a choice I would deprecate PQ altogether. That would make things simpler. Your change will need to be applied to both BinaryBuffer and Bin

Re: [collections] BinaryHeap and PriorityQueue

2004-01-01 Thread Stephen Colebourne
> > We could go further and actually deprecated PQ. But I'm a little wary of > > that. > > We should decide whether or not Queue implementations belong in > [collections]. I am +0 on this (the "+" is because BinaryHeap/Buffer > exists). If no, we should deprecate. See below. > > > > (And both Bin

Re: [collections] BinaryHeap and PriorityQueue

2004-01-01 Thread Phil Steitz
Sorry to respond first to the commit message (must be all the "oversight talk" ;) See interspersed. Stephen Colebourne wrote: I have made the following changes: - PriorityQueue now disapproved (not deprecated, but the language indicates it is) - BinaryHeap in main package is not deprecated, as i

Re: [collections] BinaryHeap and PriorityQueue

2004-01-01 Thread Stephen Colebourne
I have made the following changes: - PriorityQueue now disapproved (not deprecated, but the language indicates it is) - BinaryHeap in main package is not deprecated, as it is the only implementation of PQ - BinaryHeap in buffer subpackage renamed to BinaryBuffer. No longer implements PQ - PQ decora

[collections] BinaryHeap and PriorityQueue

2003-12-29 Thread Stephen Colebourne
BinaryHeap is a very old collections class, originally from Avalon. It implements PriorityQueue interface. PQ is an interface that does not extend Collection, Buffer is effectively the replacement that does. They use different terms though - PQ insert/peek/pop - Buffer add/get/remove. PQ is also b