Class MultiGraph
java.lang.Object
org.graphstream.graph.implementations.AbstractElement
org.graphstream.graph.implementations.AbstractGraph
org.graphstream.graph.implementations.AdjacencyListGraph
org.graphstream.graph.implementations.MultiGraph
- All Implemented Interfaces:
Iterable<Node>
,Element
,Graph
,Structure
,AttributeSink
,ElementSink
,Pipe
,Replayable
,Sink
,Source
public class MultiGraph extends AdjacencyListGraph
A graph implementation that supports multiple edges between two nodes.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.graphstream.graph.implementations.AbstractElement
AbstractElement.AttributeChangeEvent
Nested classes/interfaces inherited from interface org.graphstream.stream.Replayable
Replayable.Controller
-
Field Summary
Fields inherited from class org.graphstream.graph.implementations.AdjacencyListGraph
DEFAULT_EDGE_CAPACITY, DEFAULT_NODE_CAPACITY, GROW_FACTOR
-
Constructor Summary
Constructors Constructor Description MultiGraph(String id)
Creates an empty graph with strict checking and without auto-creation.MultiGraph(String id, boolean strictChecking, boolean autoCreate)
Creates an empty graph with default edge and node capacity.MultiGraph(String id, boolean strictChecking, boolean autoCreate, int initialNodeCapacity, int initialEdgeCapacity)
Creates an empty graph. -
Method Summary
Methods inherited from class org.graphstream.graph.implementations.AdjacencyListGraph
edges, getEdge, getEdge, getEdgeCount, getNode, getNode, getNodeCount, nodes
Methods inherited from class org.graphstream.graph.implementations.AbstractGraph
addAttributeSink, addEdge, addElementSink, addNode, addSink, attributeSinks, clear, clearAttributeSinks, clearElementSinks, clearSinks, display, display, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeFactory, edgeRemoved, elementSinks, getReplayController, getStep, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, isAutoCreationEnabled, isStrict, iterator, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeFactory, nodeRemoved, removeAttributeSink, removeEdge, removeEdge, removeElementSink, removeNode, removeSink, setAutoCreate, setEdgeFactory, setNodeFactory, setStrict, stepBegins, stepBegins
Methods inherited from class org.graphstream.graph.implementations.AbstractElement
attributeKeys, clearAttributes, getAttribute, getAttribute, getAttributeCount, getFirstAttributeOf, getFirstAttributeOf, getId, getIndex, hasAttribute, hasAttribute, removeAttribute, setAttribute, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.graphstream.graph.Element
attributeKeys, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getFirstAttributeOf, getFirstAttributeOf, getId, getIndex, getLabel, getMap, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasLabel, hasMap, hasNumber, hasVector, removeAttribute, setAttribute, setAttributes
Methods inherited from interface org.graphstream.graph.Graph
addEdge, addEdge, addEdge, addEdge, addEdge, read, read, removeEdge, removeEdge, removeEdge, removeEdge, removeNode, removeNode, write, write
-
Constructor Details
-
MultiGraph
public MultiGraph(String id, boolean strictChecking, boolean autoCreate, int initialNodeCapacity, int initialEdgeCapacity)Creates an empty graph.- Parameters:
id
- Unique identifier of the graph.strictChecking
- If true any non-fatal error throws an exception.autoCreate
- If true (and strict checking is false), nodes are automatically created when referenced when creating a edge, even if not yet inserted in the graph.initialNodeCapacity
- Initial capacity of the node storage data structures. Use this if you know the approximate maximum number of nodes of the graph. The graph can grow beyond this limit, but storage reallocation is expensive operation.initialEdgeCapacity
- Initial capacity of the edge storage data structures. Use this if you know the approximate maximum number of edges of the graph. The graph can grow beyond this limit, but storage reallocation is expensive operation.
-
MultiGraph
Creates an empty graph with default edge and node capacity.- Parameters:
id
- Unique identifier of the graph.strictChecking
- If true any non-fatal error throws an exception.autoCreate
- If true (and strict checking is false), nodes are automatically created when referenced when creating a edge, even if not yet inserted in the graph.
-
MultiGraph
Creates an empty graph with strict checking and without auto-creation.- Parameters:
id
- Unique identifier of the graph.
-