public class SimpleOrientedGraph<T>
extends java.lang.Object
| Constructor and Description |
|---|
SimpleOrientedGraph() |
SimpleOrientedGraph(java.util.Map<T,java.util.List<T>> graph) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(T node,
T neighbour) |
boolean |
containsACycle(T aNode,
java.util.Set<T> visitedNodes)
detect a cycle in the graph
|
java.util.Map<T,java.util.List<T>> |
getGraph() |
java.util.Set<T> |
getNotOrientedNeighbours(T node) |
java.util.Set<T> |
getSourceNodes() |
boolean |
isAConnectedGraph() |
boolean |
isEmpty() |
boolean |
isValid() |
public boolean isAConnectedGraph()
public boolean isEmpty()
public java.util.Set<T> getSourceNodes()
public boolean containsACycle(T aNode, java.util.Set<T> visitedNodes)
public boolean isValid()