コード例 #1
0
 public static void Highlight(this IGraphPath self, IEndPoints endpoints)
 {
     self.Path
     .Where(vertex => !endpoints.IsEndPoint(vertex))
     .OfType <IMarkable>()
     .ForEach(vertex => vertex.MarkAsPath());
 }
コード例 #2
0
        public AlgorithmEventArgs(int visitedVertices,
                                  IEndPoints endPoints = null, IVertex vertex = null)
        {
            if (vertex != null)
            {
                IsEndPoint = endPoints?.IsEndPoint(vertex) ?? false;
            }

            Vertex          = vertex ?? new NullVertex();
            VisitedVertices = visitedVertices;
        }