如何在JUNG中使用PageRank算法? [英] How to use PageRank algorithm in JUNG?
本文介绍了如何在JUNG中使用PageRank算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用JUNG作为工具来可视化网络图并计算网络属性(例如,indegree,outdegree和pagerank).
我知道JUNG已经实现了PageRank算法,但是手册中没有有关使用pagerank算法的说明( http://jung.sourceforge.net/doc/index.html ).
有人知道怎么做吗?
我还尝试了以下代码,但出现错误" Vertex CLP Holdings Ltd不是此图的元素".
代码文件是此处
THX !!
解决方案
此处示例:
- http://jung.sourceforge.net/doc/index.html).
Does anyone knows how to do it?
I also tried the following code, but it came out an error "Vertex CLP Holdings Ltd not an element of this graph".
public void calcPageRank() { PageRank<MyNode, MyLink> alg = new PageRank<MyNode, MyLink>(g,0.1); alg.initialize(); System.out.println(alg.getVertexScore(new MyNode(53084,"CLP Holdings Ltd"))); }
code file is here
THX!!
解决方案Example here:
这篇关于如何在JUNG中使用PageRank算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文