public static void Highlight(this IGraphPath self, IEndPoints endpoints) { self.Path .Where(vertex => !endpoints.IsEndPoint(vertex)) .OfType <IMarkable>() .ForEach(vertex => vertex.MarkAsPath()); }
public AlgorithmEventArgs(int visitedVertices, IEndPoints endPoints = null, IVertex vertex = null) { if (vertex != null) { IsEndPoint = endPoints?.IsEndPoint(vertex) ?? false; } Vertex = vertex ?? new NullVertex(); VisitedVertices = visitedVertices; }