From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA15652; Wed, 28 Apr 2004 17:06:58 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA15223 for ; Wed, 28 Apr 2004 17:06:56 +0200 (MET DST) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3SF6tYM010955 for ; Wed, 28 Apr 2004 17:06:55 +0200 Received: from pc8-123 (pc8-123 [129.175.8.123]) by lri.lri.fr (8.12.10/jtpda-5.4) with ESMTP id i3SEeJCr025025 ; Wed, 28 Apr 2004 16:40:20 +0200 (MEST) Received: from filliatr by pc8-123 with local (Exim 3.35 #1 (Debian)) id 1BIqEV-00078s-00; Wed, 28 Apr 2004 16:40:19 +0200 From: Jean-Christophe Filliatre MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16527.49747.433942.267909@gargle.gargle.HOWL> Date: Wed, 28 Apr 2004 16:40:19 +0200 To: skaller@users.sourceforge.net Cc: "Yaron M. Minsky" , Brian Hurt , Martin Berger , The Caml Trade Subject: Re: [Caml-list] [ANN] The Missing Library In-Reply-To: <1083162666.9537.983.camel@pelican.wigram> References: <1083140676.9537.831.camel@pelican.wigram> <1083151902.29774.18.camel@localhost.localdomain> <1083154175.9537.944.camel@pelican.wigram> <16527.44649.729729.106381@gargle.gargle.HOWL> <1083162666.9537.983.camel@pelican.wigram> X-Mailer: VM 7.03 under Emacs 20.7.2 Reply-To: Jean-Christophe.Filliatre@lri.fr (Jean-Christophe Filliatre) X-MailScanner: Found to be clean X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; filliatre:01 filliatre:01 lri:01 caml-list:01 iterator:01 val:01 iterator:01 val:01 implemented:01 triples:01 writes:01 nodes:02 iterators:02 iterators:02 stack:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk skaller writes: > > > In ocamlgraph we provide depth-first and breadth-first graph traversal > > both as HOF and as iterators. Iterators have the following signature: > > > > ====================================================================== > > type iterator > > val start : G.t -> iterator > > val step : iterator -> iterator > > val get : iterator -> G.V.t > > Perhaps the iterator is actually the triple: > > (iterator, step, get) In the particular case of ocamlgraph, the iterators are not implemented as functions triples (though they could be). Instead it is basically a stack for the DFS and a queue for the DFS (plus the graph itself and a set of not yet visited nodes to ensure the traversal of all connected components). -- Jean-Christophe ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners