public void latticToDot(File dotFile) { try (FileOutputStream fileStream = new FileOutputStream(dotFile); OutputStreamWriter writer = new OutputStreamWriter(fileStream, "UTF-8");) { DOTExporter<Set<A>, DefaultEdge> dot = new DOTExporter<Set<A>, DefaultEdge>( new StringNameProvider<Set<A>>() { @Override public String getVertexName(Set<A> vertex) { StringBuilder sb = new StringBuilder(); sb.append("\"{"); String comma = ""; for (A s : vertex) { sb.append(comma); sb.append(s.toString()); comma = ", "; } sb.append("}\""); return sb.toString(); } }, null, null); dot.export(writer, lattice); } catch (IOException e) { e.printStackTrace(); } }
@SuppressWarnings("unused") private static <V,E> void printGraph(Graph<V,E> graph) { DOTExporter<V,E> exp = new DOTExporter<V,E>(new StringNameProvider<V>(), null, null); exp.export(new BufferedWriter(new PrintWriter(System.out)), graph); }
@SuppressWarnings("unused") private static <V,E> void printGraph(Graph<V,E> graph) { DOTExporter<V,E> exp = new DOTExporter<V,E>(new StringNameProvider<V>(), null, null); exp.export(new BufferedWriter(new PrintWriter(System.out)), graph); }
@SuppressWarnings("unused") private static <V, E> void printGraph(final Graph<V, E> graph) { final DOTExporter<V, E> exp = new DOTExporter<>(new StringComponentNameProvider<V>(), null, null); exp.exportGraph(graph, new BufferedWriter(new PrintWriter(System.out))); }
public void toDot(File dotFile) { try (FileOutputStream fileStream = new FileOutputStream(dotFile); OutputStreamWriter writer = new OutputStreamWriter(fileStream, "UTF-8");) { DOTExporter<CfgBlock, CfgEdge> dot = new DOTExporter<CfgBlock, CfgEdge>(new StringNameProvider<CfgBlock>(), null, null); dot.export(writer, this); } catch (IOException e) { e.printStackTrace(); } }
public void doGetDot(StaplerRequest req, StaplerResponse rsp) throws IOException { new DOTExporter<JobInvocation, JobEdge>().export(rsp.getWriter(), jobsGraph); }
DOTExporter<Action, DefaultEdge> exporter = new DOTExporter<>(new VertexNameProvider<Action>() { @Override public String getVertexName(Action o) {
DOTExporter<Long, RoadSegment> exporter = new DOTExporter<>(new IntegerNameProvider<Long>(), null, null, vertexAttributeProvider, edgeAttributeProvider); exporter.export(writer, graph);
public void toSimpleDot(File dotFile) { try (FileOutputStream fileStream = new FileOutputStream(dotFile); OutputStreamWriter writer = new OutputStreamWriter(fileStream, "UTF-8");) { DOTExporter<CfgBlock, CfgEdge> dot = new DOTExporter<CfgBlock, CfgEdge>(new StringNameProvider<CfgBlock>() { @Override public String getVertexName(CfgBlock vertex) { StringBuilder sb = new StringBuilder(); sb.append("\""); sb.append(vertex.getLabel()); sb.append("\""); return sb.toString(); } }, null, null); dot.export(writer, this); } catch (IOException e) { e.printStackTrace(); } }
final DOTExporter<V, E> exporter = new DOTExporter<V, E>(vertexNameProvider, null, null); final StringWriter w = new StringWriter(); exporter.export(w, from);
DOTExporter<V, E> exporter = new DOTExporter<V, E>( new IntegerNameProvider<V>(), new StringNameProvider<V>(),