Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Hello,
with this patch I introduce generic weight types in all the implementations of the domain (mainly classes in the model packages both in main and test). Consequently I updated tests and references to be fully generic.
One side effect is that WeightedEdge does not implement Comparable anymore, because that would imply passing it a Comparator for weights as an argument upon creation. Instead, without polluting WeightedEdge, I changed the classes where it was needed to be Comparable (e.g. in Kruskal there is a PriorityQueue that is now initialized with an appropriate Comparator instead of relying on Comparable edges).
All tests are green. Hoping to help
Claudio