Le Thursday 30 Jun 2011 à 13:56:19 (+0200), Andrew a écrit :
> Török Edwin wrote:
> >On 06/30/2011 02:30 PM, Andrew wrote:
> >>Hi there,
> >>
> >>Does the standard library provide priority queues in OCaml? I'll be taking 
> >>exams where I can use OCaml in a few days, but I couldn't find much 
> >>documentation on priority queues online.
> >>
> >
> >No, but the manual has an example of implementing priority queues:
> >http://caml.inria.fr/pub/docs/manual-ocaml/manual004.html
> 
> Ouch.
> 
> >>How would you implement Dijkstra's algorithm, otherwise?
> >
> >C doesn't have priority queues either (ok C++ does),
> >but you can implement them yourself.
> >
> 
> Perhaps I should have chosen C++ then. There's very little time in a
> competitive exam to implement fudamental data structures by
> yourself.

There's an implementation of them in Jane Street's library, and Markus
Mottl also has a repositorial where he implemented some structures from
Okasaki's little book.

        http://hg.ocaml.info/release/pure-fun/file/330eff97ead2

But I'm not sure whether that fits the scope of a "competitive exam".

-- 
     Guillaume Yziquel


-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to