public void OverEdges(EdgeCallback callback, object closure) { if (++time == 0) { time = 1; } OverEdge(startingEdge, callback, closure); }
private static void OverEdge(Edge edge, EdgeCallback callback, object closure) { if (edge.Token == time) { return; } edge.Token = time; edge.Sym.Token = time; callback(edge, closure); OverEdge(edge.ONext, callback, closure); OverEdge(edge.OPrev, callback, closure); OverEdge(edge.DNext, callback, closure); OverEdge(edge.DPrev, callback, closure); }
public void OverEdges(EdgeCallback callback) { OverEdges(callback, null); }
private static void OverEdge(Edge edge, EdgeCallback callback, object closure) { if (edge.Token == time) return; edge.Token = time; edge.Sym.Token = time; callback(edge, closure); OverEdge(edge.ONext, callback, closure); OverEdge(edge.OPrev, callback, closure); OverEdge(edge.DNext, callback, closure); OverEdge(edge.DPrev, callback, closure); }
public void OverEdges(EdgeCallback callback, object closure) { if (++time == 0) time = 1; OverEdge(startingEdge, callback, closure); }
public void OverEdges(EdgeCallback callback) { OverEdges(callback, null); }
/// <summary>Invokes a callback on each edge</summary> /// <param name="cb">Callbacke to be invoked</param> public void ForAllEdges(EdgeCallback cb) { foreach (Edge edge in _Edges) cb(edge); }