DFSEvent

public enum DFSEvent<SearchSpace> where SearchSpace : GraphProtocol

The events that occur during depth first search within a graph.

  • The start of the depth first search, recording the starting vertex.

    Declaration

    Swift

    case start(SearchSpace.VertexId)
  • When a new vertex is discovered in the search space.

    Declaration

    Swift

    case discover(SearchSpace.VertexId)
  • When an edge is traversed to explore the destination.

    Declaration

    Swift

    case examine(SearchSpace.EdgeId)
  • When the edge is determined to form part of the search tree.

    This event occurs when the destination of the edge is newly discovered.

    Declaration

    Swift

    case treeEdge(SearchSpace.EdgeId)
  • When the edge’s destination is being processed (i.e. already on the stack).

    Declaration

    Swift

    case backEdge(SearchSpace.EdgeId)
  • When the edge’s destination has already been processed.

    Declaration

    Swift

    case forwardOrCrossEdge(SearchSpace.EdgeId)
  • When all edges from a vertex have been explored.

    Declaration

    Swift

    case finish(SearchSpace.VertexId)