pydseamslib.cyoda.findRings

Contents

pydseamslib.cyoda.findRings#

pydseamslib.cyoda.findRings(fullGraph: primitive::Graph, v: int, visited: List[int], maxDepth: int, depth: int, root: int) int#

Main function that searches for all rings

Parameters:
  • fullGraph (Graph object containing the vertices [and the neighbour lists]. Vertices may be 'removed' from the Graph)

  • v (The current vertex being visited or checked. It is added to the list of all vertices visited.)

  • visited (A vector containing a list of the vertices visited for book-keeping. If the current visited vector fulfills the condition for being a ring, it is added to the rings vector of vector in the Graph)

  • maxDepth (The maximum depth upto which rings will be searched. This means that rings larger than maxDepth will not be generated)

  • depth (The current depth. When this function is called for the first time from primitive::countAllRingsFromIndex, the depth is initialized to 0. When the depth is greater than or equal to maxDepth, the function exits.)

  • root (The first vertex, from which the current visited vector [candidate ring] is being grown. This is initialized to a dummy value of -1, when it is called from primitive::countAllRingsFromIndex)