powered by
Find k-best assignments for a given matrix (returns both solved matrices and costs).
get_k_best(mat, k_best = NULL, objective = "min", proxy_Inf = 10000000L)
Square matrix (N x N) in which values represent the weights
How many best scenarios should be returned
Should the cost be minimized ('min') or maximized ('max')? Defaults to 'min'.
What should be considered as a proxy for Inf? Defaults to 10e06; if objective = 'max' the sign is automatically reversed.
A list with solutions and costs (objective values).
# NOT RUN { set.seed(1) mat <- matrix(sample.int(15, 10*10, TRUE), 10, 10) get_k_best(mat, 3) # }
Run the code above in your browser using DataLab