public class MutableUndirectedAdjacencyGraph<V> extends UndirectedAdjacencyGraph<V> implements MutableGraph<V>, UndirectedGraph<V>
Constructor and Description |
---|
MutableUndirectedAdjacencyGraph() |
MutableUndirectedAdjacencyGraph(Map<V,Collection<V>> adjListMap) |
MutableUndirectedAdjacencyGraph(Map<V,Collection<V>> adjListMap,
Supplier<Collection<V>> adjListSupplier) |
Modifier and Type | Method and Description |
---|---|
MutableUndirectedAdjacencyGraph<V> |
addEdge(V sourceVertex,
V targetVertex)
Inserts the edge (u,v) into the graph, and returns an edge descriptor
pointing to the new edge.
|
MutableUndirectedAdjacencyGraph<V> |
addVertex(V v) |
MutableUndirectedAdjacencyGraph<V> |
removeEdge(V sourceVertex,
V targetVertex)
Remove the edge(u,v) from the graph.
|
MutableUndirectedAdjacencyGraph<V> |
removeVertex(V v)
Remove u from the vertex set of the graph.
|
containsEdge, containsEdge
adjacentVertices, contains, forEachAdjacentEdge, forEachAdjacentVertex, iterator, noOfVertices, outEdges, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addEdge, removeEdge
isDirected
contains, containsEdge, containsEdge, edges, edgeStream, edgeSupplier, forEachEdge, forEachVertex, getEdge, noOfEdges, noOfVertices, sortedEdgeStreamToString, str, stream, vertices
forEach, iterator, spliterator
adjacentVertices, forEachAdjacentVertex
outDegree
public MutableUndirectedAdjacencyGraph(Map<V,Collection<V>> adjListMap, Supplier<Collection<V>> adjListSupplier)
public MutableUndirectedAdjacencyGraph(Map<V,Collection<V>> adjListMap)
public MutableUndirectedAdjacencyGraph()
public MutableUndirectedAdjacencyGraph<V> addVertex(V v)
addVertex
in interface MutableGraph<V>
public MutableUndirectedAdjacencyGraph<V> addEdge(V sourceVertex, V targetVertex)
MutableGraph
addEdge
in interface MutableGraph<V>
public MutableUndirectedAdjacencyGraph<V> removeVertex(V v)
MutableGraph
removeVertex
in interface MutableGraph<V>
public MutableUndirectedAdjacencyGraph<V> removeEdge(V sourceVertex, V targetVertex)
MutableGraph
removeEdge
in interface MutableGraph<V>
Copyright © 2014–2015. All rights reserved.