// IterateEdges for/range on all edges of the graph,
// call ActionOnEdge for each iterated edge
// NOTE: for undirected graph, will only iterate each edge once
IterateEdges for/range on all edges of the graph,
call ActionOnEdge for each iterated edge
NOTE: for undirected graph, will only iterate each edge once
// IterateEdges for / range on all edges of the graph // call ActionOnEdge for each iterated edge // NOTE : for undirected graph will only iterate each edge once
func (g adjacencyMatrixGraph) IterateEdges(action ActionOnEdge) {
	set := map[EdgeID]struct{}{} 
	g.IterateAllNodes(func(u NodeID) {
		g.IterateAdjacencyNodes(u, func(v NodeID) {
			edge := EdgeID{From: u, To: v}
			_, okFromTo := set[edge]
			_, okToFrom := set[edge.Reverse()]
			if !okFromTo && !okToFrom {
				action(edge)
				set[edge] = struct{}{}
			}
		})
	})
}
func ( g adjacencyMatrixGraph ) IterateEdges ( action ActionOnEdge ) { set := map [ EdgeID ] struct { } { } g . IterateAllNodes ( func ( u NodeID ) { g . IterateAdjacencyNodes ( u , func ( v NodeID ) { edge := EdgeID { From : u , To : v } _ , okFromTo := set [ edge ] _ , okToFrom := set [ edge . Reverse ( ) ] if ! okFromTo && ! okToFrom { action ( edge ) set [ edge ] = struct { } { } } } ) } ) }
IterateEdges for/range on all edges of the graph,
call ActionOnEdge for each iterated edge
NOTE: for undirected graph, will only iterate each edge once
IterateEdges for / range on all edges of the graph call ActionOnEdge for each iterated edge NOTE : for undirected graph will only iterate each edge once
//used to filter setteled edge // not touch before