Class CycleDetector

    • Constructor Detail

      • CycleDetector

        public CycleDetector()
    • Method Detail

      • introducesCycle

        public static List<String> introducesCycle​(Vertex vertex,
                                                   Map<Vertex,​Integer> vertexStateMap)
        This method will be called when an edge leading to given vertex was added and we want to check if introduction of this edge has not resulted in apparition of cycle in the graph
        Parameters:
        vertex -
        vertexStateMap -
        Returns:
      • introducesCycle

        public static List<String> introducesCycle​(Vertex vertex)