Class FilterUtils
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.filters.FilterUtils
-
public class FilterUtils extends java.lang.ObjectUtility methods relating to filtering.
-
-
Constructor Summary
Constructors Constructor Description FilterUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V,E,G extends edu.uci.ics.jung.graph.Hypergraph<V,E>>
java.util.Collection<G>createAllInducedSubgraphs(java.util.Collection<? extends java.util.Collection<V>> vertex_collections, G graph)Creates the induced subgraphs ofgraphassociated with each element ofvertex_collections.static <V,E,G extends edu.uci.ics.jung.graph.Hypergraph<V,E>>
GcreateInducedSubgraph(java.util.Collection<V> vertices, G graph)Creates the induced subgraph fromgraphwhose vertex set is equal tovertices.
-
-
-
Method Detail
-
createInducedSubgraph
public static <V,E,G extends edu.uci.ics.jung.graph.Hypergraph<V,E>> G createInducedSubgraph(java.util.Collection<V> vertices, G graph)Creates the induced subgraph fromgraphwhose vertex set is equal tovertices. The graph returned hasverticesas its vertex set, and includes all edges fromgraphwhich are incident only to elements ofvertices.- Type Parameters:
V- the vertex typeE- the edge type- Parameters:
vertices- the subset ofgraph's vertices around which the subgraph is to be constructedgraph- the graph whose subgraph is to be constructed- Returns:
- the subgraph induced by
vertices - Throws:
java.lang.IllegalArgumentException- if any vertex inverticesis not ingraph
-
createAllInducedSubgraphs
public static <V,E,G extends edu.uci.ics.jung.graph.Hypergraph<V,E>> java.util.Collection<G> createAllInducedSubgraphs(java.util.Collection<? extends java.util.Collection<V>> vertex_collections, G graph)Creates the induced subgraphs ofgraphassociated with each element ofvertex_collections. Note that these vertex collections need not be disjoint.- Type Parameters:
V- the vertex typeE- the edge type- Parameters:
vertex_collections- the collections of vertex collections to be used to induce the subgraphsgraph- the graph whose subgraphs are to be created- Returns:
- the induced subgraphs of
graphassociated with each element ofvertex_collections
-
-