Main Distances#

compute_retrospective_distance(instance_1, instance_2, inner_distance) -> (<class 'float'>, <class 'list'>)[source]#

Computes the retrospective distance between two Roommates instances.

Parameters:
  • instance_1

  • instance_2

  • inner_distance

Returns:

  • float – The distance between the two instances.

  • list – The matching between the two instances.

get_matching_cost_positionwise(instance_1: Roommates, instance_2: Roommates, inner_distance: callable) list[list][source]#

Return: Cost table

get_matching_cost_retrospective(instance_1: Roommates, instance_2: Roommates, inner_distance: callable) list[list][source]#

Return: Cost table