pylibmgm.LAPSolver

class pylibmgm.LAPSolver

Linear Assignment Problem solver.

Solves pairwise graph matching problems with only unary costs (no pairwise terms) to optimality. Calls the implementation of Scipy’s linear_sum_assignment function.

Methods

__init__(model)

Initialize LAP solver.

run()

Solve the linear assignment problem.

__init__(model: pylibmgm.GmModel) None

Initialize LAP solver.

Parameters:

model (GmModel) – The graph matching model (should have no edges, only assignments).

run() pylibmgm.GmSolution

Solve the linear assignment problem.

Returns:

Optimal solution.

Return type:

GmSolution