Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.graph.filters.impl
Class KNeighborhoodFilter

    java.lang.Object
      edu.uci.ics.jung.graph.filters.impl.KNeighborhoodFilter

All Implemented Interfaces:
  Filter

public class KNeighborhoodFilter
extends Object
implements Filter

A filter used to extract the k-neighborhood around one or more root node(s)

Author:
  Danyel Fisher

Field Summary
`static int` | `IN`
`static int` | `IN_OUT`
`static int` | `OUT`

Constructor Summary
`KNeighborhoodFilter(Set rootNodes, int radiusK, int edgeType)` Constructs a new instance of the filter
`KNeighborhoodFilter(Vertex rootNode, int radiusK, int edgeType)` Constructs a new instance of the filter

Method Summary
`UnassembledGraph` | `filter(Graph graph)` Constructs an unassembled graph containing the k-neighbhood around the root node(s)
`String` | `getName()` Gets a name that describes this filter.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### IN_OUT

    public static final int IN_OUT

See Also:
  Constant Field Values

### IN

    public static final int IN

See Also:
  Constant Field Values

### OUT

    public static final int OUT

See Also:
  Constant Field Values

Constructor Detail

### KNeighborhoodFilter

    public KNeighborhoodFilter(Set rootNodes,
                               int radiusK,
                               int edgeType)

  Constructs a new instance of the filter

Parameters:
  `rootNodes` - the set of root nodes
  `radiusK` - the neighborhood radius around the root set
  `edgeType` - 0 for in/out edges, 1 for in-edges, 2 for out-edges

### KNeighborhoodFilter

    public KNeighborhoodFilter(Vertex rootNode,
                               int radiusK,
                               int edgeType)

  Constructs a new instance of the filter

Parameters:
  `rootNode` - the root node
  `radiusK` - the neighborhood radius around the root set
  `edgeType` - 0 for in/out edges, 1 for in-edges, 2 for out-edges

Method Detail

### getName

    public String getName()

  Description copied from interface: `Filter`
  Gets a name that describes this filter. It is used by the auditing methods in ``GraphAssemblyRecord``

  Specified by:
    `getName` in interface `Filter`
  Returns:
    A string that describes the filter.

### filter

    public UnassembledGraph filter(Graph graph)

  Constructs an unassembled graph containing the k-neighbhood around the root node(s)

  Specified by:
    `filter` in interface `Filter`
  Parameters:
    `graph` - An input graph to be filtered.
  Returns:
    an `UnassembledGraph` that contains the subset of vertices and edges from `g` pass the filter.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD