// ControllableIterateAdjacencyNodes for/range on all adjacency nodes of current node,
// call IterateAction for each iterated node.
// break the loop immdiately if action return `BreakIterate`
ControllableIterateAdjacencyNodes for/range on all adjacency nodes of current node,
call IterateAction for each iterated node.
break the loop immdiately if action return `BreakIterate`
// ControllableIterateAdjacencyNodes for / range on all adjacency nodes of current node // call IterateAction for each iterated node . // break the loop immdiately if action return ` BreakIterate `
func (g adjacencyMatrixGraph) ControllableIterateAdjacencyNodes(currNode NodeID, action IterateActionWithControl) {
	if !g.IsNodeValid(currNode) {
		return
	}
	for i, v := range g.adjMatrix[currNode] {
		if v {
			condition := action(NodeID(i))
			if condition == BreakIterate {
				break
			}
		}
	}
}
func ( g adjacencyMatrixGraph ) ControllableIterateAdjacencyNodes ( currNode NodeID , action IterateActionWithControl ) { if ! g . IsNodeValid ( currNode ) { return } for i , v := range g . adjMatrix [ currNode ] { if v { condition := action ( NodeID ( i ) ) if condition == BreakIterate { break } } } }
ControllableIterateAdjacencyNodes for/range on all adjacency nodes of current node,
call IterateAction for each iterated node.
ControllableIterateAdjacencyNodes for / range on all adjacency nodes of current node call IterateAction for each iterated node .