public class KNeighborhoodExtractor
extends java.lang.Object
Constructor and Description |
---|
KNeighborhoodExtractor() |
Modifier and Type | Method and Description |
---|---|
static Graph |
extractInDirectedNeighborhood(DirectedGraph graph,
java.util.Set rootNodes,
int radiusK)
Extracts the subgraph comprised of all vertices within distance K (in-directed) from any
node in rootNodes.
|
static Graph |
extractNeighborhood(Graph graph,
java.util.Set rootNodes,
int radiusK)
Extracts the subgraph comprised of all vertices within distance K (undirected) from any
node in rootNodes.
|
static Graph |
extractOutDirectedNeighborhood(DirectedGraph graph,
java.util.Set rootNodes,
int radiusK)
Extracts the subgraph comprised of all vertices within distance K (out-directed) from any
node in rootNodes.
|
public static Graph extractNeighborhood(Graph graph, java.util.Set rootNodes, int radiusK)
graph
- the graph whose subgraph is to be extractedrootNodes
- the set of root nodes (starting vertices) in the graphradiusK
- the radius of the subgraph to be extractedpublic static Graph extractOutDirectedNeighborhood(DirectedGraph graph, java.util.Set rootNodes, int radiusK)
graph
- the graph whose subgraph is to be extractedrootNodes
- the set of root nodes (starting vertices) in the graphradiusK
- the radius of the subgraph to be extractedpublic static Graph extractInDirectedNeighborhood(DirectedGraph graph, java.util.Set rootNodes, int radiusK)
graph
- the graph whose subgraph is to be extractedrootNodes
- the set of root nodes (starting vertices) in the graphradiusK
- the radius of the subgraph to be extracted