RefactorFirst icon indicating copy to clipboard operation
RefactorFirst copied to clipboard

Prioritize cycles with the same backward / min cut edges.

Open jimbethancourt opened this issue 1 year ago • 0 comments
trafficstars

Cycles with the same edges should be prioritized first. The highest frequency edges should be prioritized first.

Maybe do something like this?

        Map<DefaultWeightedEdge, Integer> minCutEdgeCount = new HashMap<>();
        rankedCycles.stream().flatMap(rankedCycle -> rankedCycle.getMinCutEdges().stream()).forEach(minCutEdge ->
                minCutEdgeCount.put(minCutEdge, minCutEdgeCount.getOrDefault(minCutEdge, 0) + 1));

jimbethancourt avatar Oct 15 '24 00:10 jimbethancourt