diff --git a/code/python/src/algorithms/rucksack/display.py b/code/python/src/algorithms/rucksack/display.py index 62a942f..60d3040 100644 --- a/code/python/src/algorithms/rucksack/display.py +++ b/code/python/src/algorithms/rucksack/display.py @@ -95,17 +95,17 @@ def display_branch_and_bound( else: used_choices.append(choice); expr = display_sum(choice=choice, values=values, as_maximum=False, order=order); - rows.append((f'{lb_estimate:g}', expr, ('' if pad == MaskValue.UNSET else pad.value), S)); + rows.append((f'{lb_estimate:+g}', expr, S, ('' if pad == MaskValue.UNSET else pad.value))); table = pd.DataFrame(rows) \ - .rename(columns={0: 'b', 1: 'g(TOP(S))', 2: 'pad?', 3: 'S'}) \ + .rename(columns={0: 'bound', 1: 'g(TOP(S))', 2: 'S', 3: 'pad?'}) \ .reset_index(drop=True); # benutze pandas-Dataframe + tabulate, um schöner darzustellen: repr = tabulate( table, - headers=['b', 'g(TOP(S))', 'pad?', 'S'], + headers=['bound', 'g(TOP(S))', 'S — stack', 'pad?'], showindex=False, - colalign=('left', 'left', 'center', 'right'), + colalign=('left', 'left', 'right', 'center'), tablefmt='rst' ); return repr;