As an example,
ex1(0x5B23, 0xC78D, 0x44AE, 0x1612, 0x90FF, 1000,
[ ((0x44AE, 0x5B23), 800, 0x1612, 4),
((0x44AE, 0xC78D), 800, 0x90FF, 10),
((0xC78D, 0x5B23), 400, 0x1612, 8),
((0x44AE, 0xC78D), 1800, 0x90FF, 12),
((0x5B23, 0x44AE), 100, 0x1612, 2)
]
returns
( [2098, 568, 0], [66, 268], [ [0, 0, 0], [0, 0, -28] ] )
because all players start with 1000Ħ in their account and, at the end,
– the balance of player 1 amounts to 2098Ħ,
– the balance of player 2 amounts to 568Ħ,
– the balance of player 3 amounts to 0Ħ,
– intermediary 1 earned 66Ħ,
– intermediary 2 earned 268Ħ,
– player 3 still owes 28Ħ to intermediary 2.
This is the example of the HW2rec and it returns the balance of the players(first list), the earnings of the intermediary(second list). Now in the third list, the second list represents the debt, but the first list ([0, 0, 0]), I don't know what does represent.