LinearAssignment {GraphAlignment} | R Documentation |

## Solve linear assignment problem

### Description

Solve the linear assignment problem specified by the cost matrix.

### Usage

LinearAssignment(matrix)

### Arguments

### Details

The return value is a permutation vector equal to the solution of the linear assignment problem specified by the cost matrix. The result is the permutation P for which MP is minimal (where M is the cost matrix).

### References

Jonker, R & Volgenant, A. (1987) Computing 38, 325–340.

### Examples

m <- matrix(rnorm(25), 5, 5)
px <- LinearAssignment(round(-1000 * (m / max(abs(m)))))
m[px,]

[Package

*GraphAlignment* version 1.0-0

Index]