Extract solution score from RapResults()
or
RapSolved()
object.
score(x, y)
# S3 method for RapResults
score(x, y = 0)
# S3 method for RapSolved
score(x, y = 0)
RapResults()
or RapSolved()
object.
Available inputs include: NULL
to return all scores,
integer
number specifying the solution for which the score should
be returned, and 0
to return score for the best solution.
matrix
or numeric
vector with solution score(s)
depending on arguments.
# \dontrun{
# load data
data(sim_rs)
# score for the best solution
score(sim_rs, 0)
#> [1] 20
# score for the second solution
score(sim_rs, 2)
#> [1] 20
# score for all solutions
score(sim_rs, NULL)
#> [1] 20 20 20
# }