Class SingleGraph

All Implemented Interfaces:
Iterable<Node>, Element, Graph, Structure, AttributeSink, ElementSink, Pipe, Replayable, Sink, Source
Direct Known Subclasses:
DefaultGraph

public class SingleGraph
extends AdjacencyListGraph
An implementation of graph that supports only one edge between two nodes.
  • Constructor Details

    • SingleGraph

      public SingleGraph​(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.
    • SingleGraph

      public SingleGraph​(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.
    • SingleGraph

      public SingleGraph​(String id)
      Creates an empty graph with strict checking and without auto-creation.
      Parameters:
      id - Unique identifier of the graph.