edu.uci.ics.jung.algorithms.filters
Class FilterUtils

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.filters.FilterUtils

public class FilterUtils
extends Object

Utility methods relating to filtering.


Constructor Summary
FilterUtils()
           
 
Method Summary
static
<V,E,G extends Hypergraph<V,E>>
Collection<G>
createAllInducedSubgraphs(Collection<? extends Collection<V>> vertex_collections, G graph)
          Creates the induced subgraphs of graph associated with each element of vertex_collections.
static
<V,E,G extends Hypergraph<V,E>>
G
createInducedSubgraph(Collection<V> vertices, G graph)
          Creates the induced subgraph from graph whose vertex set is equal to vertices.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterUtils

public FilterUtils()
Method Detail

createInducedSubgraph

public static <V,E,G extends Hypergraph<V,E>> G createInducedSubgraph(Collection<V> vertices,
                                                                      G graph)
Creates the induced subgraph from graph whose vertex set is equal to vertices. The graph returned has vertices as its vertex set, and includes all edges from graph which are incident only to elements of vertices.

Type Parameters:
V - the vertex type
E - the edge type
Parameters:
vertices - the subset of graph's vertices around which the subgraph is to be constructed
graph - the graph whose subgraph is to be constructed
Returns:
the subgraph induced by vertices
Throws:
IllegalArgumentException - if any vertex in vertices is not in graph

createAllInducedSubgraphs

public static <V,E,G extends Hypergraph<V,E>> Collection<G> createAllInducedSubgraphs(Collection<? extends Collection<V>> vertex_collections,
                                                                                      G graph)
Creates the induced subgraphs of graph associated with each element of vertex_collections. Note that these vertex collections need not be disjoint.

Type Parameters:
V - the vertex type
E - the edge type
Parameters:
vertex_collections - the collections of vertex collections to be used to induce the subgraphs
graph - the graph whose subgraphs are to be created
Returns:
the induced subgraphs of graph associated with each element of vertex_collections


Copyright © 2009. All Rights Reserved.