E - the graph edge typepublic class FastutilMapIntVertexGraph<E> extends AbstractBaseGraph<Integer,E>
The following example creates a simple undirected weighted graph:
Graph<Integer,
DefaultWeightedEdge> g = new FastutilMapIntVertexGraph<>(
SupplierUtil.createIntegerSupplier(), SupplierUtil.createDefaultWeightedEdgeSupplier(),
DefaultGraphType.simple().asWeighted());
FastutilMapGraph,
Serialized FormDEFAULT_EDGE_WEIGHT| Constructor and Description |
|---|
FastutilMapIntVertexGraph(Supplier<Integer> vertexSupplier,
Supplier<E> edgeSupplier,
GraphType type)
Construct a new graph.
|
FastutilMapIntVertexGraph(Supplier<Integer> vertexSupplier,
Supplier<E> edgeSupplier,
GraphType type,
boolean fastLookups)
Construct a new graph.
|
addEdge, addEdge, addVertex, addVertex, clone, containsEdge, containsVertex, createIntrusiveEdgesSpecifics, createSpecifics, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeSource, getEdgeSupplier, getEdgeTarget, getEdgeWeight, getType, getVertexSupplier, incomingEdgesOf, inDegreeOf, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSupplier, setEdgeWeight, setVertexSupplier, vertexSetassertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSetsfinalize, getClass, notify, notifyAll, wait, wait, waitcontainsEdge, removeAllEdges, removeAllEdges, removeAllVertices, setEdgeWeightpublic FastutilMapIntVertexGraph(Supplier<Integer> vertexSupplier, Supplier<E> edgeSupplier, GraphType type, boolean fastLookups)
vertexSupplier - the vertex supplier, can be nulledgeSupplier - the edge supplier, can be nulltype - the graph typefastLookups - whether to index vertex pairs to allow (expected) constant time edge
lookups (by vertex endpoints)IllegalArgumentException - if the graph type is not supported by this implementationpublic FastutilMapIntVertexGraph(Supplier<Integer> vertexSupplier, Supplier<E> edgeSupplier, GraphType type)
By default we index vertex pairs to allow (expected) constant time edge lookups.
vertexSupplier - the vertex supplier, can be nulledgeSupplier - the edge supplier, can be nulltype - the graph typeIllegalArgumentException - if the graph type is not supported by this implementationCopyright © 2018. All rights reserved.