我觉得是不是一个for循环就可以找到最小边了啊?
private int getMinEdge(List<Edge> edgeLst) {
int minWeight = 0;
int edgeIndex = -1;
int i = 0;
for (; i < edgeLst.size(); i++) {
if(!edgeLst.get(i).isSelected())
{
if(minWeight > edgeLst.get(i).getWeightValue())
{
minWeight = edgeLst.get(i).getWeightValue();
edgeIndex = i;
}
}
}
return edgeIndex;
}