lapjv: Solves a linear assignment problem using the Jonker-Vogenant...

View source: R/rlapjv.R

lapjvR Documentation

Solves a linear assignment problem using the Jonker-Vogenant algorithm or LAPMOD variant

Description

Find the matching of rows to columns that minimizes or maximizes the cost. See do_lap for usage.

Usage

lapjv(cost, maximize = FALSE)

lapmod(cost, maximize = FALSE)

Arguments

cost

For lapjv, an object that can be coerced to a matrix. For lapmod, a sparseMatrix.

maximize

If FALSE (default) then costs are minimized and if TRUE the costs are maximized

Details

The C++ code for these method is modified from code in the python lapjv package.

The cost matrix is padded with a single row and column of very large entries that helps to avoid stability issues with the algorithms.

Value

The assignment of rows to columns as a vector.

References

R. Jonker, A. Volgenant (1987). A shortest augmenting path algorithm for dense and sparse linear assignment problems. Computing, pages 325-340.

A. Volgenant (1996). Linear and Semi-Assignment Problems: A Core Oriented Approach. Computer Ops Res., pages 917-932.


dpmcsuss/iGraphMatch documentation built on May 22, 2024, 8:52 p.m.