score_solution | R Documentation |
compute the price of a partition solution (and check is valid).
score_solution(x, solution)
x |
NumericMatix, for j>=i x(i,j) is the cost of partition element [i,...,j] (inclusive). |
solution |
vector of indices |
price
x <- matrix(c(1,1,5,1,1,0,5,0,1), nrow=3)
s <- c(1, 2, 4)
score_solution(x, s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.