*Completely* removed old weights log feature

This commit is contained in:
Theo Barollet
2023-10-23 09:44:44 +02:00
parent d5a747e814
commit 87b2bdc134

View File

@@ -64,11 +64,6 @@ sealed class Solver(
private val nameSortedPairables by lazy {
pairables.sortedWith(::nameSort)
}
// Sorting for logging purpose
private val logSortedPairablesMap by lazy {
val logSortedPairables = pairables.sortedWith(::logSort)
logSortedPairables.associateWith { logSortedPairables.indexOf(it) }
}
protected val pairablesMap by lazy {
pairables.associateBy { it.id }
@@ -101,13 +96,6 @@ sealed class Solver(
open fun nameSort(p: Pairable, q: Pairable): Int {
return if (p.name > q.name) 1 else -1
}
// Sorting function to order the weight matrix for debugging
open fun logSort(p: Pairable, q: Pairable): Int {
if (p.rating == q.rating) {
return if (p.name > q.name) 1 else -1
}
return p.rating - q.rating
}
open fun openGothaWeight(p1: Pairable, p2: Pairable) =
1.0 + // 1 is minimum value because 0 means "no matching allowed"