Internally it handles the points and the possible matchings as a bi-partite graphs and finds an optimal matching due to euclidean distance by an efficient linear programming solver.

getOptimalPointMatching(x, y, method = "lp", full.output = FALSE)

Arguments

x

[Network | matrix]
First network or matrix of coordinates of the first point set.

y

[Network | matrix]
Second network or matrix of coordinates of the second point set.

method

[character(1)]
Method used to solve the assignment problem. There are currently two methods available:

lp

Solves the problem be means of linear programming with the lpSolve package to optimality. This is the default.

push_relabel

The assignment problem can be formulated as a matching problem on bipartite graphs. This method makes use of the push-relabel algorithm from the igraph. Solves to optimality.

random

Random point matching. Just for comparisson.

greedy

Greedy point matching, i.e., iterativeely assign two unmatched points with minimal euclidean distance.

full.output

[logical(1)]
Should optimization process information, e.g., the weight of the best matching, be returned? Default is FALSE.

Value

[matrix | list] Either a matrix where each row consists of the indizes of the pairwise assigned points. If full.output = TRUE a list is returned with the assignment matrix “pm”, the method “method” and the optimal weight “opt.weight”.

See also