Class GraphDOT
- java.lang.Object
-
- net.automatalib.serialization.dot.GraphDOT
-
public final class GraphDOT extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringinitialLabel(int n)static StringinitialLabel(String idPrefix, int n)static <N,E>
DOTVisualizationHelper<N,E>toDOTVisualizationHelper(List<VisualizationHelper<N,? super E>> helpers)static <N,E>
DOTVisualizationHelper<N,E>toDOTVisualizationHelper(VisualizationHelper<N,E> helper)static voidwrite(List<Graph<?,?>> graphs, Appendable a)Renders a list ofGraphs as clusters (subgraphs) in the GraphVIZ DOT format.static <S,I,T>
voidwrite(Automaton<S,I,T> automaton, Collection<? extends I> inputAlphabet, Appendable a)Renders anAutomatonin the GraphVIZ DOT format.static <S,I,T>
voidwrite(Automaton<S,I,T> automaton, Collection<? extends I> inputAlphabet, Appendable a, List<VisualizationHelper<S,? super TransitionEdge<I,T>>> additionalHelpers)Renders anAutomatonin the GraphVIZ DOT format.static <S,I,T>
voidwrite(Automaton<S,I,T> automaton, Collection<? extends I> inputAlphabet, Appendable a, VisualizationHelper<S,? super TransitionEdge<I,T>>... additionalHelpers)Renders anAutomatonin the GraphVIZ DOT format.static voidwrite(GraphViewable gv, Appendable a)static <N,E>
voidwrite(Graph<N,E> graph, Appendable a)Renders aGraphin the GraphVIZ DOT format.static <N,E>
voidwrite(Graph<N,E> graph, Appendable a, List<VisualizationHelper<N,? super E>> additionalHelpers)Renders aGraphin the GraphVIZ DOT format.static <N,E>
voidwrite(Graph<N,E> graph, Appendable a, VisualizationHelper<N,? super E>... additionalHelpers)Renders aGraphin the GraphVIZ DOT format.
-
-
-
Method Detail
-
write
public static void write(GraphViewable gv, Appendable a) throws IOException
- Throws:
IOException
-
write
public static <S,I,T> void write(Automaton<S,I,T> automaton, Collection<? extends I> inputAlphabet, Appendable a) throws IOException
Renders anAutomatonin the GraphVIZ DOT format.- Parameters:
automaton- the automaton to render.inputAlphabet- the input alphabet to considera- the appendable to write to- Throws:
IOException- if writing toafails
-
write
@SafeVarargs public static <S,I,T> void write(Automaton<S,I,T> automaton, Collection<? extends I> inputAlphabet, Appendable a, VisualizationHelper<S,? super TransitionEdge<I,T>>... additionalHelpers) throws IOException
Renders anAutomatonin the GraphVIZ DOT format.- Parameters:
automaton- the automaton to render.inputAlphabet- the input alphabet to considera- the appendable to write toadditionalHelpers- additional helpers for providing visualization properties.- Throws:
IOException- if writing toafails
-
write
public static <S,I,T> void write(Automaton<S,I,T> automaton, Collection<? extends I> inputAlphabet, Appendable a, List<VisualizationHelper<S,? super TransitionEdge<I,T>>> additionalHelpers) throws IOException
Renders anAutomatonin the GraphVIZ DOT format.- Parameters:
automaton- the automaton to render.inputAlphabet- the input alphabet to considera- the appendable to write toadditionalHelpers- additional helpers for providing visualization properties.- Throws:
IOException- if writing toafails
-
write
public static <N,E> void write(Graph<N,E> graph, Appendable a) throws IOException
Renders aGraphin the GraphVIZ DOT format.- Parameters:
graph- the graph to rendera- the appendable to write to.- Throws:
IOException- if writing toafails.
-
write
@SafeVarargs public static <N,E> void write(Graph<N,E> graph, Appendable a, VisualizationHelper<N,? super E>... additionalHelpers) throws IOException
Renders aGraphin the GraphVIZ DOT format.- Parameters:
graph- the graph to rendera- the appendable to write to.additionalHelpers- additional helpers for providing visualization properties.- Throws:
IOException- if writing toafails.
-
write
public static <N,E> void write(Graph<N,E> graph, Appendable a, List<VisualizationHelper<N,? super E>> additionalHelpers) throws IOException
Renders aGraphin the GraphVIZ DOT format.- Parameters:
graph- the graph to rendera- the appendable to write to.additionalHelpers- additional helpers for providing visualization properties.- Throws:
IOException- if writing toafails.
-
write
public static void write(List<Graph<?,?>> graphs, Appendable a) throws IOException
Renders a list ofGraphs as clusters (subgraphs) in the GraphVIZ DOT format. Note that any markup information for each cluster must be provided by the respective graph'svisualization helper.- Parameters:
graphs- the graphs to rendera- the appendable to write to.- Throws:
IOException- if writing toafails.
-
initialLabel
public static String initialLabel(int n)
-
toDOTVisualizationHelper
public static <N,E> DOTVisualizationHelper<N,E> toDOTVisualizationHelper(VisualizationHelper<N,E> helper)
-
toDOTVisualizationHelper
public static <N,E> DOTVisualizationHelper<N,E> toDOTVisualizationHelper(List<VisualizationHelper<N,? super E>> helpers)
-
-