我应该从Webgraph框架传递给ArcListASCIIGraph的图形格式是什么?

时间:2013-04-08 08:08:23

标签: java graph compression

我正在尝试使用WebGraph框架压缩图形。我已经设置了我需要的罐子,并使用以下代码:

ImmutableGraph ig = ArcListASCIIGraph.load(BoldiTest.class.getResource("/citation-csconf-mult5-PaperJSON.graph.txt").getFile());
System.out.println(ig.numNodes()+" "+ig.numArcs());
ImmutableGraph.store(BVGraph.class, ig, "output");

图表已正确加载但无法存储为我感兴趣的图表。对于更小的图形(3弧),一切顺利,所以我猜代码是正确的。

我在下面提供了堆栈跟踪。有任何想法吗? (数字是节点和弧线)

124538 249755 
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at it.unimi.dsi.big.webgraph.ImmutableGraph.store(ImmutableGraph.java:623)
    at it.unimi.dsi.big.webgraph.ImmutableGraph.store(ImmutableGraph.java:638)
    at gr.di.uoa.a8.boldi.BoldiTest.main(BoldiTest.java:22)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at it.unimi.dsi.big.webgraph.ImmutableGraph.store(ImmutableGraph.java:619)
    ... 2 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
    at it.unimi.dsi.big.webgraph.BVGraph.updateBins(BVGraph.java:1701)
    at it.unimi.dsi.big.webgraph.BVGraph.storeInternal(BVGraph.java:1808)
    at it.unimi.dsi.big.webgraph.BVGraph.store(BVGraph.java:1650)
    at it.unimi.dsi.big.webgraph.BVGraph.store(BVGraph.java:1678)
    at it.unimi.dsi.big.webgraph.BVGraph.store(BVGraph.java:1690)
    ... 7 more

1 个答案:

答案 0 :(得分:0)

在消除重复边缘并对输入文件进行排序后,我设法存储图形。