当前位置: 首页>>代码示例>>Java>>正文


Java IntegerNameProvider类代码示例

本文整理汇总了Java中org.jgrapht.ext.IntegerNameProvider的典型用法代码示例。如果您正苦于以下问题:Java IntegerNameProvider类的具体用法?Java IntegerNameProvider怎么用?Java IntegerNameProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IntegerNameProvider类属于org.jgrapht.ext包,在下文中一共展示了IntegerNameProvider类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toDOT

import org.jgrapht.ext.IntegerNameProvider; //导入依赖的package包/类
void toDOT(File file, DirectedGraph<AddonVertex, AddonDependencyEdge> graph)
{
   DOTExporter<AddonVertex, AddonDependencyEdge> exporter = new DOTExporter<>(
            new IntegerNameProvider<AddonVertex>(),
            new AddonVertexNameProvider(),
            new AddonDependencyEdgeNameProvider());
   try (FileWriter fw = new FileWriter(file))
   {
      exporter.export(fw, graph);
      fw.flush();
   }
   catch (IOException e)
   {
      e.printStackTrace();
   }
}
 
开发者ID:forge,项目名称:furnace,代码行数:17,代码来源:GenerateDOTMojo.java

示例2: toDOT

import org.jgrapht.ext.IntegerNameProvider; //导入依赖的package包/类
public void toDOT(File file)
{
   FileWriter fw = null;
   try
   {
      DOTExporter<AddonVertex, AddonDependencyEdge> exporter = new DOTExporter<AddonVertex, AddonDependencyEdge>(
               new IntegerNameProvider<AddonVertex>(),
               new AddonVertexNameProvider(),
               new AddonDependencyEdgeNameProvider());

      fw = new FileWriter(file);
      exporter.export(fw, graph);
      fw.flush();
   }
   catch (IOException e)
   {
      e.printStackTrace();
   }
   finally
   {
      Streams.closeQuietly(fw);
   }
}
 
开发者ID:forge,项目名称:furnace,代码行数:24,代码来源:MasterGraph.java

示例3: toDot

import org.jgrapht.ext.IntegerNameProvider; //导入依赖的package包/类
private void toDot(String filename) {

		// TODO check if graphviz/dot is actually available on the current
		// machine

		try {

			FileWriter fstream = new FileWriter(filename);
			BufferedWriter out = new BufferedWriter(fstream);
			if (!graph.vertexSet().isEmpty()) {
				// FrameVertexNameProvider nameprovider = new
				// FrameVertexNameProvider(mn.instructions);
				// DOTExporter<Integer,DefaultEdge> exporter = new
				// DOTExporter<Integer,DefaultEdge>();
				// DOTExporter<Integer,DefaultEdge> exporter = new
				// DOTExporter<Integer,DefaultEdge>(new IntegerNameProvider(),
				// nameprovider, new IntegerEdgeNameProvider());
				// DOTExporter<Integer,DefaultEdge> exporter = new
				// DOTExporter<Integer,DefaultEdge>(new LineNumberProvider(),
				// new LineNumberProvider(), new IntegerEdgeNameProvider());
				DOTExporter<V, E> exporter = new DOTExporter<V, E>(
						new IntegerNameProvider<V>(),
						new StringNameProvider<V>(),
						new StringEdgeNameProvider<E>(),
						vertexAttributeProvider, edgeAttributeProvider);

				// new IntegerEdgeNameProvider<E>());
				exporter.export(out, graph);

				logger.info("exportet " + getName());
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:37,代码来源:EvoSuiteGraph.java

示例4: export

import org.jgrapht.ext.IntegerNameProvider; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void export(String filename){
	VertexNameProvider<ApplicationVertex> vertID = new IntegerNameProvider<ApplicationVertex>();
	VertexNameProvider<ApplicationVertex> vertName = new IntegerNameProvider<ApplicationVertex>();
	EdgeNameProvider<ApplicationEdge> edgeName = new StringEdgeNameProvider<ApplicationEdge>();
	@SuppressWarnings({ "unchecked", "rawtypes" })
	DOTExporter t = new DOTExporter(vertID,vertName,edgeName);
	try {
		t.export(new FileWriter(filename), this.graph );

	} catch (IOException e) {
		System.out.println("Eccezione");
		e.printStackTrace();
	}
}
 
开发者ID:ecarlini,项目名称:smartfed,代码行数:16,代码来源:Application.java

示例5: exportGraph

import org.jgrapht.ext.IntegerNameProvider; //导入依赖的package包/类
public static void exportGraph(Graph<StringLabeledObject,StringLabeledObject> g, File f) throws IOException{
	GmlExporter<StringLabeledObject,StringLabeledObject> export =
		new GmlExporter<StringLabeledObject,StringLabeledObject>(
				new IntegerNameProvider<StringLabeledObject>(), null,
				new IntegerEdgeNameProvider<StringLabeledObject>(), null);
	export.setPrintLabels(GmlExporter.PRINT_EDGE_VERTEX_LABELS);
	
	FileWriter out = new FileWriter(f);
	if(g instanceof DirectedGraph){
		export.export(out, (DirectedGraph<StringLabeledObject, StringLabeledObject>) g);
	} else if(g instanceof UndirectedGraph){
		export.export(out, (UndirectedGraph<StringLabeledObject, StringLabeledObject>) g);
	}
	out.close();
}
 
开发者ID:WellingR,项目名称:Maximal-Common-Subgraph,代码行数:16,代码来源:ImportExport.java

示例6: DOTExporter

import org.jgrapht.ext.IntegerNameProvider; //导入依赖的package包/类
/**
 * Constructs a new DOTExporter object with an integer name provider for the
 * vertex IDs and null providers for the vertex and edge labels.
 */
public DOTExporter()
{
    this(new IntegerNameProvider<V>(), null, null);
}
 
开发者ID:dratc,项目名称:owl2diagram,代码行数:9,代码来源:DOTExporter.java

示例7: toGraphML

import org.jgrapht.ext.IntegerNameProvider; //导入依赖的package包/类
public void toGraphML(Writer writer) throws SAXException, TransformerConfigurationException {
    GraphMLExporter gme = new GraphMLExporter(new IntegerNameProvider(), new StringNameProvider(), new IntegerEdgeNameProvider(), new StringEdgeNameProvider());
    gme.export(writer, this);
}
 
开发者ID:automenta,项目名称:opennars,代码行数:5,代码来源:NARGraph.java

示例8: toGML

import org.jgrapht.ext.IntegerNameProvider; //导入依赖的package包/类
public void toGML(Writer writer)  {
    GmlExporter gme = new GmlExporter(new IntegerNameProvider(), new StringNameProvider(), new IntegerEdgeNameProvider(), new StringEdgeNameProvider());
    gme.setPrintLabels(GmlExporter.PRINT_EDGE_VERTEX_LABELS);
    gme.export(writer, this);
}
 
开发者ID:automenta,项目名称:opennars,代码行数:6,代码来源:NARGraph.java


注:本文中的org.jgrapht.ext.IntegerNameProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。