Package com.jgalgo

Class GraphsUtils


  • public class GraphsUtils
    extends Object
    Static methods class for graphs.
    Author:
    Barak Ugav
    • Method Detail

      • containsSelfEdges

        public static boolean containsSelfEdges​(Graph g)
        Check whether a graph contain self edges.

        A self edge is an edge whose source and target is the same vertex.

        Parameters:
        g - a graph
        Returns:
        true if the graph contain at least one self edge, else false
      • containsParallelEdges

        public static boolean containsParallelEdges​(Graph g)
        Check whether a graph contain parallel edges.

        Two parallel edges are edges that have the same source and target vertices.

        Parameters:
        g - a graph
        Returns:
        true if the graph contain at least one pair of parallel edges, else false