edu.uci.ics.jung.algorithms.filters
Class KNeighborhoodFilter<V,E>
java.lang.Object
edu.uci.ics.jung.algorithms.filters.KNeighborhoodFilter<V,E>
- All Implemented Interfaces:
- Filter<V,E>
public class KNeighborhoodFilter<V,E>
- extends Object
- implements Filter<V,E>
A filter used to extract the k-neighborhood around one or more root node(s)
- Author:
- Danyel Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KNeighborhoodFilter
public KNeighborhoodFilter(Set<V> rootNodes,
int radiusK,
KNeighborhoodFilter.EdgeType edgeType)
- Constructs a new instance of the filter
- Parameters:
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-edges
KNeighborhoodFilter
public KNeighborhoodFilter(V rootNode,
int radiusK,
KNeighborhoodFilter.EdgeType edgeType)
- Constructs a new instance of the filter
- Parameters:
rootNode
- the root noderadiusK
- the neighborhood radius around the root setedgeType
- 0 for in/out edges, 1 for in-edges, 2 for out-edges
getName
public String getName()
transform
public Graph<V,E> transform(Graph<V,E> graph)
- Constructs an unassembled graph containing the k-neighborhood around the root node(s)
Copyright © 2008 null. All Rights Reserved.