public class KNeighborhoodFilter<V,E> extends Object implements Filter<V,E>
Modifier and Type | Class and Description |
---|---|
static class |
KNeighborhoodFilter.EdgeType
The type of edge to follow for defining the neighborhood.
|
Constructor and Description |
---|
KNeighborhoodFilter(Set<V> rootNodes,
int radiusK,
KNeighborhoodFilter.EdgeType edgeType)
Constructs a new instance of the filter.
|
KNeighborhoodFilter(V rootNode,
int radiusK,
KNeighborhoodFilter.EdgeType edgeType)
Constructs a new instance of the filter.
|
Modifier and Type | Method and Description |
---|---|
Graph<V,E> |
apply(Graph<V,E> graph)
Constructs an unassembled graph containing the k-neighborhood around the root node(s).
|
public KNeighborhoodFilter(Set<V> rootNodes, int radiusK, KNeighborhoodFilter.EdgeType edgeType)
rootNodes
- the set of root nodesradiusK
- the neighborhood radius around the root setedgeType
- 0 for in/out edges, 1 for in-edges, 2 for out-edgespublic KNeighborhoodFilter(V rootNode, int radiusK, KNeighborhoodFilter.EdgeType edgeType)
rootNode
- the root noderadiusK
- the neighborhood radius around the root setedgeType
- 0 for in/out edges, 1 for in-edges, 2 for out-edgesCopyright © 2015. All rights reserved.