alun.graph
Class AbstractGraph<V,E>
java.lang.Object
alun.graph.AbstractGraph<V,E>
- All Implemented Interfaces:
- Graph<V,E>, MutableGraph<V,E>
- Direct Known Subclasses:
- Network
public abstract class AbstractGraph<V,E>
- extends java.lang.Object
- implements MutableGraph<V,E>
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractGraph
public AbstractGraph()
contains
public boolean contains(java.lang.Object x)
- Specified by:
contains in interface Graph<V,E>
connects
public boolean connects(java.lang.Object x,
java.lang.Object y)
- Specified by:
connects in interface Graph<V,E>
getVertices
public java.util.Set<V> getVertices()
- Specified by:
getVertices in interface Graph<V,E>
outNeighbours
public java.util.Collection<V> outNeighbours(java.lang.Object x)
- Specified by:
outNeighbours in interface Graph<V,E>
inNeighbours
public java.util.Collection<V> inNeighbours(java.lang.Object x)
- Specified by:
inNeighbours in interface Graph<V,E>
clear
public void clear()
- Specified by:
clear in interface MutableGraph<V,E>
add
public boolean add(V x)
- Specified by:
add in interface MutableGraph<V,E>
disconnect
public boolean disconnect(java.lang.Object x)
remove
public boolean remove(java.lang.Object x)
- Specified by:
remove in interface MutableGraph<V,E>
connect
public boolean connect(V x,
V y)
- Specified by:
connect in interface MutableGraph<V,E>
disconnect
public boolean disconnect(java.lang.Object x,
java.lang.Object y)
- Specified by:
disconnect in interface MutableGraph<V,E>