V
- vertex typeE
- edge typepublic interface Graph<V,E extends HyperEdge<V>>
Modifier and Type | Method and Description |
---|---|
Graph<V,E> |
addEdge(E e)
Adds an edge to this graph.
|
Graph<V,E> |
addVertex(V v)
Adds a vertex to this graph.
|
Set<E> |
edges()
Gets the set of all edges in this graph.
|
Set<E> |
edges(V v)
Gets the set of all edges associated with a vertex in this graph.
|
Graph<V,E> |
removeEdge(E e)
Removes an edge from this graph.
|
Graph<V,E> |
removeVertex(V v)
Removes a vertex from this graph.
|
Set<V> |
vertices()
Gets the set of all vertices in this graph.
|
Set<V> vertices()
Set<E> edges(V v)
v
- a vertexGraph<V,E> addVertex(V v)
v
is already in the graph.v
- the vertex to addGraph<V,E> addEdge(E e)
e
is already in the graph.
If the edge contains new vertices, those will be added to the graph.e
- the edge to addGraph<V,E> removeVertex(V v)
v
is not in the graph.
The edges associated with this vertex are also removed.v
- the vertex to be removedCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.