concept loop in category graphx

This is an excerpt from Manning's book Spark GraphX in Action.
Recursion, where a function calls itself, runs the risk of causing a stack overflow. For certain types of recursion, though, Scala is able to compile the function as a loop instead. Scala provides an annotation @tailrec to check whether this transformation is possible, raising a compile-time exception if not.
A cyclic graph is one that contains cycles, a series of vertices that are connected in a loop (see figure 3.10). An acyclic graph has no cycles. One of the reasons to be aware of the distinction is that if you have an algorithm that traverses connected vertices by following the connecting edges, then cyclic graphs pose the risk that naive implementations can get stuck going round forever.
Another distinction is whether the graph allows multiple edges between the same pair of vertices, or indeed an edge that starts and ends with the same vertex. The possibilities are shown in figure 3.12. GraphX graphs are pseudographs, so extra steps must be taken if parallel edges and loops are to be eliminated, such as calling groupEdges() or subgraph().