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, 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 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 © 2019. All rights reserved.