奇怪的导入问题-Jung2 [英] weird import issues - Jung2

查看:94
本文介绍了奇怪的导入问题-Jung2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力使Jung 2.1.1正常工作,但是所做的任何重大更改都没有道理.

I've been trying to get Jung 2.1.1 to work successfully but whatever breaking changes were made are just not making sense.

导入2.1.1 jar之后,出现错误:

After importing the 2.1.1 jars, I get the error:

The constructor VisualizationViewer(Network, LayoutAlgorithm, Dimension) is undefined

该行:

VisualizationViewer vv = new 
            VisualizationViewer(g, layoutAlgorithm, new Dimension(900, 900));

其中

 Network g = NetworkBuilder.undirected().build(); // and other load steps

还有其他无法使用的导入,例如

There are other imports that aren't working, like

import edu.uci.ics.jung.visualization.decorators.PickableNodePaintFunction;
import edu.uci.ics.jung.visualization.layout.LayoutAlgorithmTransition;

Jung 2.1.1 JAR中的类似乎仍使用旧定义,例如

It appears the classes in the Jung 2.1.1 JAR still use the old definitions, for example

VisualizationViewer(Layout<V,E>,Dimension)

而不是

VisualizationViewer(Network<N,E>,Dimension,Dimension)

推荐答案

https://github.com/jrtom/jung/issues/201

简短的版本是您不应该在JUNG网站上克隆HEAD版本;那是正在开发的3.0版本,尚未准备好发布,并且与2.1.1不兼容.明确将2.1.1版本用于罐子和样品.

The short version is that you should not be cloning the HEAD version on the JUNG website; that's the 3.0 version in development, which is not yet ready for release, and is incompatible with 2.1.1. Use the 2.1.1 version explicitly for both the jars and the samples.

这篇关于奇怪的导入问题-Jung2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆