Package com.jgalgo.alg
Class GraphsUtils
- java.lang.Object
-
- com.jgalgo.alg.GraphsUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V,E>
booleancontainsParallelEdges(Graph<V,E> g)
Check whether a graph contain parallel edges.static <V,E>
booleancontainsSelfEdges(Graph<V,E> g)
Check whether a graph contain self edges.
-
-
-
Method Detail
-
containsSelfEdges
public static <V,E> boolean containsSelfEdges(Graph<V,E> g)
Check whether a graph contain self edges.A self edge is an edge whose source and target is the same vertex.
- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- a graph- Returns:
true
if the graph contain at least one self edge, elsefalse
-
containsParallelEdges
public static <V,E> boolean containsParallelEdges(Graph<V,E> g)
Check whether a graph contain parallel edges.Two parallel edges are edges that have the same source and target vertices.
- Type Parameters:
V
- the vertices typeE
- the edges type- Parameters:
g
- a graph- Returns:
true
if the graph contain at least one pair of parallel edges, elsefalse
-
-