Skip to content

Commit

Permalink
better inharitance for ParamSet
Browse files Browse the repository at this point in the history
  • Loading branch information
mb706 authored Jun 20, 2024
1 parent d260511 commit 461c3c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/ParamSet.R
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ ParamSet = R6Class("ParamSet",
#' @template field_values
values = function(xs) {
if (missing(xs)) {
return(private$.values)
return(private$.get_values())
}
if (length(xs) == 0L) {
xs = named_list()
Expand Down Expand Up @@ -1013,7 +1013,8 @@ ParamSet = R6Class("ParamSet",
.store_values = function(xs) {
# store with param ordering
private$.values = xs[match(private$.params$id, names(xs), nomatch = 0)]
}
},
.get_values = function() private$.values,
.extra_trafo = NULL,
.constraint = NULL,
.params = NULL,
Expand Down

0 comments on commit 461c3c8

Please sign in to comment.