   }
 
 
-  private func checkGraphCyclesVertices(cycles: Set<Cycle>) -> Bool {
+  private func checkGraphCyclesVertices(cycles: [Cycle]) -> Bool {
     var successful: Bool = true
     for cycle in cycles {
       assert(cycle.vertexIndices.count >= 1)

                          visitedVertices: [Int], // need order for subcycle
                          visitedEdges: [DIEdge]) {
    if currentVertexIndex == startVertexIndex && !visitedVertices.isEmpty {
      assert(visitedVertices.count == visitedEdges.count)

      result.insert(Cycle(vertexIndices: visitedVertices, edges: visitedEdges))
      return
    }


    return successful
  }

  private func checkGraphCyclesEdges(cycles: [Cycle]) -> Bool {
    var successful: Bool = true
    for cycle in cycles {
      assert(cycle.edges.count >= 1)
