-- Copyright 2003, Trustees of Indiana University -- Please see the license in the file ../LICENSE class OUTPUT_GRAPH[V, E, G->VERTEX_LIST_AND_INCIDENCE_GRAPH[V, E]] feature go(g: G) is local viter : JITERATOR[V] eiter : JITERATOR[E] do viter := g.vertices from viter.start until viter.off loop io.put_string(viter.item.out + " : ") eiter := g.out_edges(viter.item) from eiter.start until eiter.off loop io.put_string(eiter.item.out + " ") eiter.forth end viter.forth io.put_string("%N") end end print_weights(g: G; p: READABLE_PROPERTY_MAP[E, REAL]) is local viter : JITERATOR[V] eiter : JITERATOR[E] do viter := g.vertices from viter.start until viter.off loop io.put_string(viter.item.out + " : ") eiter := g.out_edges(viter.item) from eiter.start until eiter.off loop io.put_string(eiter.item.out + ":") io.put_string(p.get(eiter.item).out + " ") eiter.forth end viter.forth io.put_string("%N") end end end -- OUTPUT_GRAPH