POV-Ray : Newsgroups : povray.general : priority queue : Re: priority queue Server Time
30 Jul 2024 06:18:30 EDT (-0400)
  Re: priority queue  
From: Anthony D  Baye
Date: 16 Jul 2009 00:20:00
Message: <web.4a5ea9f8d5f9581d4b39a3180@news.povray.org>
I was, perhaps, unclear as to what I am looking for.  All I need is a
First-in-First-out structure.  A plain old queue which, preferably, grows and
shrinks with need.

I apologize for the confusion.

A.D.B.

"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> > Anthony D. Baye <Sha### [at] spamnomorehotmailcom> wrote:
> > > Has anyone written a relatively efficient array-based priority queue?
> >
> >   AFAIK a heap is usually used for priority queues because it can be
> > implemented inside an array (with no ancillary data whatsoever necessary),
> > insertion is an O(log n) operation, and getting the highest-priority element
> > is constant-time (removing it from the heap is O(log n)).
> >
> > http://en.wikipedia.org/wiki/Heap_(data_structure)
> >
> > --
> >                                                           - Warp
>
> I meant in the POV SDL.
>
> I'm working on something that would be best accomplished using a Priority queue,
> and I didn't want to have to write my own.
>
> But, as I said, I probably could if I had to.
>
> A.D.B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.