On 04/02/2012 11:31 PM, Hongbo Zhang wrote:
Hi List, I want to implement sliding window algorithm (in place, no memory copy), I wonder whether I need to write c code.
Queues are described in Chris Okasaki's book, with a functional implementation in all senses of the term.
If you don't want to roll your own, someone suggested Janestreet's core's Dequeue module and Gabriel sent you some implementation.
Regards, F.
To make it clear and simple, In c, you can record the head pointer of the array, and do the modulo operations when get and set In ocaml, it seems you have an array a of type int array, you can not do things like this *(&a+5). Many thanks
-- 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