V
 the graph vertex typeE
 the graph edge typeNeighborCache
instead.@Deprecated public class DirectedNeighborIndex<V,E> extends Object implements GraphListener<V,E>
Graphs
, they are recalculated at each invocation by walking a vertex's incident edges,
which becomes inordinately expensive when performed often.
A vertex's neighbors are cached the first time they are asked for (i.e. the index is built on demand). The index will only be updated automatically if it is added to the associated graph as a listener. If it is added as a listener to a graph other than the one it indexes, results are undefined.
Constructor and Description 

DirectedNeighborIndex(Graph<V,E> g)
Deprecated.
Creates a neighbor index for the specified directed graph.

Modifier and Type  Method and Description 

void 
edgeAdded(GraphEdgeChangeEvent<V,E> e)
Deprecated.
Notifies that an edge has been added to the graph.

void 
edgeRemoved(GraphEdgeChangeEvent<V,E> e)
Deprecated.
Notifies that an edge has been removed from the graph.

List<V> 
predecessorListOf(V v)
Deprecated.
Returns the set of vertices which are the predecessors of a specified vertex.

Set<V> 
predecessorsOf(V v)
Deprecated.
Returns the set of vertices which are the predecessors of a specified vertex.

List<V> 
successorListOf(V v)
Deprecated.
Returns the set of vertices which are the successors of a specified vertex.

Set<V> 
successorsOf(V v)
Deprecated.
Returns the set of vertices which are the successors of a specified vertex.

void 
vertexAdded(GraphVertexChangeEvent<V> e)
Deprecated.
Notifies that a vertex has been added to the graph.

void 
vertexRemoved(GraphVertexChangeEvent<V> e)
Deprecated.
Notifies that a vertex has been removed from the graph.

public Set<V> predecessorsOf(V v)
v
 the vertex whose predecessors are desiredpublic List<V> predecessorListOf(V v)
predecessorsOf(Object)
unless duplicate neighbors are required.v
 the vertex whose predecessors are desiredpublic Set<V> successorsOf(V v)
v
 the vertex whose successors are desiredpublic List<V> successorListOf(V v)
successorsOf(Object)
unless duplicate neighbors are required.v
 the vertex whose successors are desiredpublic void edgeAdded(GraphEdgeChangeEvent<V,E> e)
GraphListener
edgeAdded
in interface GraphListener<V,E>
e
 the edge event.GraphListener.edgeAdded(GraphEdgeChangeEvent)
public void edgeRemoved(GraphEdgeChangeEvent<V,E> e)
GraphListener
edgeRemoved
in interface GraphListener<V,E>
e
 the edge event.GraphListener.edgeRemoved(GraphEdgeChangeEvent)
public void vertexAdded(GraphVertexChangeEvent<V> e)
VertexSetListener
vertexAdded
in interface VertexSetListener<V>
e
 the vertex event.VertexSetListener.vertexAdded(GraphVertexChangeEvent)
public void vertexRemoved(GraphVertexChangeEvent<V> e)
VertexSetListener
vertexRemoved
in interface VertexSetListener<V>
e
 the vertex event.VertexSetListener.vertexRemoved(GraphVertexChangeEvent)
Copyright © 2017. All rights reserved.