Class DOTExporter<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - the graph edge type
    All Implemented Interfaces:

    public class DOTExporter<V,​E>
    extends BaseExporter<V,​E>
    implements GraphExporter<V,​E>
    Exports a graph into a DOT file.

    For a description of the format see

    The user can adjust the behavior using the various providers.
    Trevor Harmon, Dimitrios Michail
    • Field Detail


        public static final java.lang.String DEFAULT_GRAPH_ID
        Default graph id used by the exporter.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DOTExporter

        public DOTExporter()
        Constructs a new DOTExporter object with an integer id provider.
      • DOTExporter

        public DOTExporter​(java.util.function.Function<V,​java.lang.String> vertexIdProvider)
        Constructs a new DOTExporter object with the given id provider. Additional providers such as attributes can be given using the appropriate setter methods.
        vertexIdProvider - for generating vertex IDs. Must not be null.
    • Method Detail

      • exportGraph

        public void exportGraph​(Graph<V,​E> g,
        Exports a graph into a plain text file in DOT format.
        Specified by:
        exportGraph in interface GraphExporter<V,​E>
        g - the graph to be exported
        writer - the writer to which the graph to be exported