public class Components
extends java.lang.Object
Constructor and Description |
---|
Components() |
Modifier and Type | Method and Description |
---|---|
static <V,E> java.util.ArrayList<java.util.Set<V>> |
getAllConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G)
Return all connected components of G.
|
static <V,E> java.util.ArrayList<java.util.Set<V>> |
getAllConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G,
java.util.Set restrictNodes)
Same method as getAllConnectedComponent(Graph
|
static <V,E> java.util.ArrayList<java.util.Set<V>> |
getAllStronglyConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G)
Returns ALL strongly connected components in a directed graph (Tarjan's algorithm).
|
static <V,E> edu.uci.ics.jung.graph.Graph<V,E> |
getComplementGraph(edu.uci.ics.jung.graph.Graph<V,E> G,
org.apache.commons.collections15.Factory<E> eFactory)
Returns a graph which is the complement of G.
|
static <V,E> java.util.Set<V> |
getConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G)
Return a connected component of G.
|
static <V,E> java.util.Set<V> |
getConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G,
java.util.Set<V> restrictNodes)
Same method as getConnectedComponent(Graph
|
public static <V,E> java.util.Set<V> getConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G, java.util.Set<V> restrictNodes)
G
- graphrestrictNodes
- nodes to be excludedpublic static <V,E> java.util.Set<V> getConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G)
G
- Graph in which component has to be foundpublic static <V,E> java.util.ArrayList<java.util.Set<V>> getAllConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G, java.util.Set restrictNodes)
G
- graphrestrictNodes
- nodes to be excludedpublic static <V,E> java.util.ArrayList<java.util.Set<V>> getAllConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G)
G
- Graph in which components have to be foundpublic static <V,E> java.util.ArrayList<java.util.Set<V>> getAllStronglyConnectedComponent(edu.uci.ics.jung.graph.Graph<V,E> G)
G
- graphpublic static <V,E> edu.uci.ics.jung.graph.Graph<V,E> getComplementGraph(edu.uci.ics.jung.graph.Graph<V,E> G, org.apache.commons.collections15.Factory<E> eFactory)
G
- grapheFactory
- edge factory