scratch.joshua.jung_2_0.core
Class SimpleAbstractSparseGraph<V,E>
java.lang.Object
scratch.joshua.jung_2_0.core.SimpleAbstractSparseGraph<V,E>
- All Implemented Interfaces:
- ArchetypeGraph<V,E>, Graph<V,E>
- Direct Known Subclasses:
- SimpleDirectedSparseGraph, SimpleUndirectedSparseGraph
public abstract class SimpleAbstractSparseGraph<V,E>
- extends Object
- implements Graph<V,E>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleAbstractSparseGraph
public SimpleAbstractSparseGraph()
inDegree
public int inDegree(V vertex)
- Specified by:
inDegree
in interface Graph<V,E>
outDegree
public int outDegree(V vertex)
- Specified by:
outDegree
in interface Graph<V,E>
isPredecessor
public boolean isPredecessor(V v1,
V v2)
- Specified by:
isPredecessor
in interface Graph<V,E>
isSuccessor
public boolean isSuccessor(V v1,
V v2)
- Specified by:
isSuccessor
in interface Graph<V,E>
numPredecessors
public int numPredecessors(V vertex)
- Specified by:
numPredecessors
in interface Graph<V,E>
numSuccessors
public int numSuccessors(V vertex)
- Specified by:
numSuccessors
in interface Graph<V,E>
areNeighbors
public boolean areNeighbors(V v1,
V v2)
- Specified by:
areNeighbors
in interface ArchetypeGraph<V,E>
areIncident
public boolean areIncident(V vertex,
E edge)
- Specified by:
areIncident
in interface ArchetypeGraph<V,E>
numNeighbors
public int numNeighbors(V vertex)
- Specified by:
numNeighbors
in interface ArchetypeGraph<V,E>
degree
public int degree(V vertex)
- Specified by:
degree
in interface ArchetypeGraph<V,E>
getOpposite
public V getOpposite(V vertex,
E edge)
- Specified by:
getOpposite
in interface Graph<V,E>
getIncidentVertices
public Collection<V> getIncidentVertices(E edge)
- Specified by:
getIncidentVertices
in interface ArchetypeGraph<V,E>