Skip to content

Commit 3174137

Browse files
committed
resolve comment
1 parent e41729f commit 3174137

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

puan/ruleset.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,17 @@ func (r *Ruleset) FindPeriodInSolution(solution Solution) (Period, error) {
181181
}
182182

183183
func (r *Ruleset) copy() Ruleset {
184-
source := r.polyhedron.A()
185-
aMatrix := make([][]int, len(source))
186-
for i := range source {
187-
aMatrix[i] = make([]int, len(source[i]))
188-
copy(aMatrix[i], source[i])
184+
aMatrix := r.polyhedron.A()
185+
aMatrixCopy := make([][]int, len(r.polyhedron.A()))
186+
for i := range aMatrix {
187+
aMatrixCopy[i] = make([]int, len(aMatrix[i]))
188+
copy(aMatrixCopy[i], aMatrix[i])
189189
}
190190

191191
bVector := make([]int, len(r.polyhedron.B()))
192192
copy(bVector, r.polyhedron.B())
193193

194-
polyhedron := pldag.NewPolyhedron(aMatrix, bVector)
194+
polyhedron := pldag.NewPolyhedron(aMatrixCopy, bVector)
195195

196196
dependantVariableIDs := make([]string, len(r.dependentVariables))
197197
copy(dependantVariableIDs, r.dependentVariables)

0 commit comments

Comments
 (0)