Is there a known algorithm for checking whether a graph is a complete digraph?
Ideally, I'd like to find a ready-to-use method from JGraphT Java library.
Alternatively, I've found the following answer regarding completeness check of an undirected graph. Would the following modification work for checking completeness of a directed graph?
- check that number of directed edges in the graph is
n(n-1)
- check that each vertice is directly connected to exactly
n-1
distinct vertices
If I don't miss anything and these conditions are sufficient I could implement these checks by myself, but I'd prefer to use existing implementation from the library if possible.