Rename counter to accumulator

This commit is contained in:
coolneng 2021-05-20 17:23:05 +02:00
parent ceea2d8824
commit 5cff3199c6
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 3 additions and 3 deletions

View File

@ -25,16 +25,16 @@ def get_row_distance(source, destination, data):
def get_fitness(solutions, data):
counter = 0
accumulator = 0
comb = combinations(solutions.index, r=2)
for index in list(comb):
elements = solutions.loc[index, :]
counter += get_row_distance(
accumulator += get_row_distance(
source=elements["point"].head(n=1).values[0],
destination=elements["point"].tail(n=1).values[0],
data=data,
)
return counter
return accumulator
def show_results(solutions, fitness, time_delta):