V
- the graph vertex typeE
- the graph edge typepublic class DefaultUndirectedGraph<V,E> extends AbstractBaseGraph<V,E>
DEFAULT_EDGE_WEIGHT
Constructor and Description |
---|
DefaultUndirectedGraph(Class<? extends E> edgeClass)
Creates a new graph.
|
DefaultUndirectedGraph(Supplier<V> vertexSupplier,
Supplier<E> edgeSupplier,
boolean weighted)
Creates a new graph.
|
Modifier and Type | Method and Description |
---|---|
static <V,E> GraphBuilder<V,E,? extends DefaultUndirectedGraph<V,E>> |
createBuilder(Class<? extends E> edgeClass)
Create a builder for this kind of graph.
|
static <V,E> GraphBuilder<V,E,? extends DefaultUndirectedGraph<V,E>> |
createBuilder(Supplier<E> edgeSupplier)
Create a builder for this kind of graph.
|
addEdge, addEdge, addVertex, addVertex, clone, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeSource, getEdgeSupplier, getEdgeTarget, getEdgeWeight, getType, getVertexSupplier, incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSupplier, setEdgeWeight, setVertexSupplier, vertexSet
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
finalize, getClass, notify, notifyAll, wait, wait, wait
containsEdge, removeAllEdges, removeAllEdges, removeAllVertices, setEdgeWeight
public DefaultUndirectedGraph(Class<? extends E> edgeClass)
edgeClass
- class on which to base the edge supplierpublic DefaultUndirectedGraph(Supplier<V> vertexSupplier, Supplier<E> edgeSupplier, boolean weighted)
vertexSupplier
- the vertex supplier, can be nulledgeSupplier
- the edge supplier, can be nullweighted
- whether the graph is weighted or notpublic static <V,E> GraphBuilder<V,E,? extends DefaultUndirectedGraph<V,E>> createBuilder(Class<? extends E> edgeClass)
V
- the graph vertex typeE
- the graph edge typeedgeClass
- class on which to base factory for edgespublic static <V,E> GraphBuilder<V,E,? extends DefaultUndirectedGraph<V,E>> createBuilder(Supplier<E> edgeSupplier)
V
- the graph vertex typeE
- the graph edge typeedgeSupplier
- the edge supplier of the new graphCopyright © 2019. All rights reserved.