Scilab function

perfect_match - min-cost perfect matching

Calling Sequence

[cst,nmatch] = perfect_match(g,arcost)

Parameters

Description

perfect_match finds a perfect min-cost matching for the graph g. g must be an undirected graph with an even number of nodes. arcost is the vector of the (integer) costs of the arcs (the dimension of arcost is twice the number of edges of the graph). The output is the vector nmatch of the perfect matching and the corresponding cost cst.

Examples

See Also