weights <- optargs$weights
if (is.null(weights))
- weights <- rep(1, K)
+ weights <- rep(1, 3)
# Build and return optimization algorithm object
methods::new("OptimParams", "li"=link, "M1"=as.double(M[[1]]),
M1 = "numeric", #order-1 moment (vector size d)
M2 = "numeric", #M2 easier to process as a vector
M3 = "numeric", #M3 easier to process as a vector
+ weights = "numeric", #weights on moments
# Dimensions
K = "integer",
d = "integer"