POV-Ray : Newsgroups : povray.general : priority queue : Re: priority queue Server Time
30 Jul 2024 06:28:41 EDT (-0400)
  Re: priority queue  
From: Warp
Date: 16 Jul 2009 08:20:16
Message: <4a5f1b00@news.povray.org>
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)

> I meant in the POV SDL.

  I implied nothing else. I just pointed out which data structure would be
the best for that task.

-- 
                                                          - Warp


Post a reply to this message

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