Skip to content

Commit

Permalink
🎨 Enhnace code in weight table repository
Browse files Browse the repository at this point in the history
  • Loading branch information
sukchan-0811 committed Dec 9, 2023
1 parent ba78e35 commit cb6f6c9
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class WeightTableRepository @Inject constructor(
val listOfSymCntPairs = mutableListOf<Pair<Symbol, Int>>()
val weights = oneWeightRow[0].weights

for (i in 0 until allSymbolList.size) {
for (i in allSymbolList.indices) {
listOfSymCntPairs.add(Pair(allSymbolList[i], weights[i]))
}

Expand Down Expand Up @@ -189,11 +189,9 @@ class WeightTableRepository @Inject constructor(
val weights = targetRow.weights
val preSymbolWeights = weights.toIntArray() // 앞 symbol의 weights

preSymbolWeights[dbIndex2] += 15
preSymbolWeights[dbIndex2] += 10

val aftSymbolWeights = preSymbolWeights

updateWeightRow(targetRow, aftSymbolWeights.toList())
updateWeightRow(targetRow, preSymbolWeights.toList())
}
}
}
Expand Down

0 comments on commit cb6f6c9

Please sign in to comment.