negatives.add(v);
negativesDegree.put(v, degree);
}
}
BudgetGraphComparator comparator = new BudgetGraphComparator();
Graph solvedGraph = new AdjacencyMatrixDirectedGraph(graph.getVertexSet().size());
for( Vertex v : graph.getVertexSet()) {
solvedGraph.addVertex(v.getId());
}
while( (!positivesDegree.isEmpty()) && (!negativesDegree.isEmpty())) {
// on tri les deux listes de vertex
comparator.setTable(positivesDegree);
Collections.sort(positives, comparator);
comparator.setTable(negativesDegree);
Collections.sort(negatives, comparator);
Collections.reverse(negatives);
Vertex maxPosV = positives.get(0);
Vertex maxNegV = negatives.get(0);