org.graphstream.graph.implementations
Class DefaultGraph

java.lang.Object
  extended by org.graphstream.graph.implementations.AbstractElement
      extended by org.graphstream.graph.implementations.AbstractGraph
          extended by org.graphstream.graph.implementations.AdjacencyListGraph
              extended by org.graphstream.graph.implementations.SingleGraph
                  extended by org.graphstream.graph.implementations.DefaultGraph
All Implemented Interfaces:
Iterable<Node>, Element, Graph, AttributeSink, ElementSink, Pipe, Sink, Source

public class DefaultGraph
extends SingleGraph

Default implementation of graph. This is just a synonym of SingleGraph. It is here for clarity only.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.graphstream.graph.implementations.AbstractElement
AbstractElement.AttributeChangeEvent
 
Field Summary
 
Fields inherited from class org.graphstream.graph.implementations.AdjacencyListGraph
DEFAULT_EDGE_CAPACITY, DEFAULT_NODE_CAPACITY, GROW_FACTOR
 
Constructor Summary
DefaultGraph(String id)
          Creates an empty graph with strict checking and without auto-creation.
DefaultGraph(String id, boolean strictChecking, boolean autoCreate)
          Creates an empty graph with default edge and node capacity.
DefaultGraph(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
getEdge, getEdge, getEdgeCount, getEdgeIterator, getNode, getNode, getNodeCount, getNodeIterator
 
Methods inherited from class org.graphstream.graph.implementations.AbstractGraph
addAttributeSink, addEdge, addEdge, addEdge, addEdge, addEdge, addEdge, addElementSink, addNode, addSink, attributeSinks, clear, clearAttributeSinks, clearElementSinks, clearSinks, display, display, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeFactory, edgeRemoved, elementSinks, getEachEdge, getEachNode, getEdgeSet, getNodeSet, getStep, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, isAutoCreationEnabled, isStrict, iterator, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeFactory, nodeRemoved, nullAttributesAreErrors, read, read, removeAttributeSink, removeEdge, removeEdge, removeEdge, removeEdge, removeEdge, removeEdge, removeElementSink, removeNode, removeNode, removeNode, removeSink, setAutoCreate, setEdgeFactory, setNodeFactory, setNullAttributesAreErrors, setStrict, stepBegins, stepBegins, write, write
 
Methods inherited from class org.graphstream.graph.implementations.AbstractElement
addAttribute, addAttributes, changeAttribute, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getEachAttributeKey, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getLabel, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, 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
addAttribute, addAttributes, changeAttribute, clearAttributes, getArray, getAttribute, getAttribute, getAttributeCount, getAttributeKeyIterator, getAttributeKeySet, getFirstAttributeOf, getFirstAttributeOf, getHash, getId, getIndex, getLabel, getNumber, getVector, hasArray, hasAttribute, hasAttribute, hasHash, hasLabel, hasNumber, hasVector, removeAttribute, setAttribute
 

Constructor Detail

DefaultGraph

public DefaultGraph(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.

DefaultGraph

public DefaultGraph(String id,
                    boolean strictChecking,
                    boolean autoCreate)
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.

DefaultGraph

public DefaultGraph(String id)
Creates an empty graph with strict checking and without auto-creation.

Parameters:
id - Unique identifier of the graph.


Copyright © 2011. All Rights Reserved.