JGrapht SimpleDirectedWeightedGraph类addEdge返回空指针(所有节点都不为null)

时间:2014-03-15 14:08:23

标签: java nullpointerexception jgrapht

当我实现构建图形(马尔可夫随机场中的图形切割算法)时,我不知道为什么当源节点和目标节点不为空时,为什么addEdge()函数不起作用并返回null在一次手术中。而且,对于根据训练数据创建的图表,我觉得太困惑为什么只是记录发生的情况。 代码:

stofEdge[i][j]=dd.addEdge(Snode,fields[i][j]);
//stofEdge is used to store the created edges. When i=573 and j=2, the edge is null.

0 个答案:

没有答案
相关问题