pylibmgm.GMLocalSearcher

class pylibmgm.GMLocalSearcher

Local search method based on iteratively re-matching graphs.

Improves a solution by re-solving pairwise graph matching problems while keeping other matchings fixed.

Methods

__init__(*args, **kwargs)

Overloaded function.

search(solution)

Perform local search to improve the solution.

__init__(model: MgmModel) None

Initialize with an MGM model.

Parameters:

model (MgmModel) – The MGM model.

__init__(model: MgmModel, matching_order: list[int]) None

Initialize with an MGM model and search order.

Parameters:
  • model (MgmModel) – The MGM model.

  • matching_order (list[int]) – Order in which to re-match graphs.

search(solution: pylibmgm.MgmSolution) bool

Perform local search to improve the solution.

Parameters:

solution (MgmSolution) – Solution to improve (modified in-place).

Returns:

True if solution was improved.

Return type:

bool