# NOT RUN {
## ------------------------------------------------
## Method `ParameterSetCollection$new`
## ------------------------------------------------
b = Binomial$new()
g = Geometric$new()
ParameterSetCollection$new(Binom1 = b$parameters(),
Binom2 = b$parameters(),
Geom = g$parameters())
ParameterSetCollection$new(lst = list(Binom1 = b$parameters(),
Binom2 = b$parameters(),
Geom = g$parameters()))
## ------------------------------------------------
## Method `ParameterSetCollection$getParameterValue`
## ------------------------------------------------
psc <- ParameterSetCollection$new(Binom1 = Binomial$new()$parameters(),
Binom2 = Binomial$new()$parameters(),
Geom = Geometric$new()$parameters())
psc$getParameterValue("Binom1__prob")
psc$getParameterValue("prob")
## ------------------------------------------------
## Method `ParameterSetCollection$getParameterSupport`
## ------------------------------------------------
b <- Binomial$new()
g <- Geometric$new()
psc <- ParameterSetCollection$new(Binom1 = b$parameters(),
Binom2 = b$parameters(),
Geom = g$parameters())
psc$getParameterSupport("Binom1__prob")
## ------------------------------------------------
## Method `ParameterSetCollection$setParameterValue`
## ------------------------------------------------
b <- Binomial$new()
g <- Geometric$new()
psc <- ParameterSetCollection$new(Binom1 = b$parameters(),
Binom2 = b$parameters(),
Geom = g$parameters())
psc$getParameterValue("Binom1__prob")
b$getParameterValue("prob")
psc$setParameterValue(Binom1__prob = 0.4)
# both updated
psc$getParameterValue("Binom1__prob")
b$getParameterValue("prob")
g$setParameterValue(prob = 0.1)
# both updated
psc$getParameterValue("Geom__prob")
g$getParameterValue("prob")
## ------------------------------------------------
## Method `ParameterSetCollection$merge`
## ------------------------------------------------
b <- Binomial$new()
g <- Geometric$new()
psc <- ParameterSetCollection$new(Binom = b$parameters())
psc2 <- ParameterSetCollection$new(Geom = g$parameters())
psc$merge(psc2)$parameters()
# }
Run the code above in your browser using DataLab