Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] [ANN] The Missing Library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] [ANN] The Missing Library

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