diff --git a/DESCRIPTION b/DESCRIPTION index 3d117c9..9af234e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: cccp -Version: 0.2-7 -Date: 2020-04-23 +Version: 0.2-8 +Date: 2020-04-24 Title: Cone Constrained Convex Problems Authors@R: c(person("Bernhard", "Pfaff", role = c("aut", "cre"), email = "bernhard@pfaffikus.de"), person("Lieven", "Vandenberghe", role = "cph", comment = "copyright holder of cvxopt"), person("Martin", "Andersen", role = "cph", comment = "copyright holder of cvxopt"), person("Joachim", "Dahl", role = "cph", comment = "copyright holder of cvxopt")) Maintainer: Bernhard Pfaff diff --git a/R/ctrl.R b/R/ctrl.R index f2f4942..1699ae8 100644 --- a/R/ctrl.R +++ b/R/ctrl.R @@ -1,6 +1,6 @@ ## ## Function for creating 'CTRL' objects -ctrl <- function(maxiters = 100L, abstol = 1e-6, reltol = 1e-6, feastol = 1e-7, +ctrl <- function(maxiters = 100L, abstol = 1e-6, reltol = 1e-6, feastol = 1e-6, stepadj = 0.95, beta = 0.5, trace = TRUE){ if(!is.integer(maxiters)){ diff --git a/man/ctrl.Rd b/man/ctrl.Rd index 8f0022b..cd597bc 100644 --- a/man/ctrl.Rd +++ b/man/ctrl.Rd @@ -13,7 +13,7 @@ \usage{ ctrl(maxiters = 100L, abstol = 1e-06, reltol = 1e-06, - feastol = 1e-07, stepadj = 0.95, beta = 0.5, trace = TRUE) + feastol = 1e-06, stepadj = 0.95, beta = 0.5, trace = TRUE) } \arguments{ diff --git a/src/DLP.cpp b/src/DLP.cpp index e5fa44e..7fe3ee7 100644 --- a/src/DLP.cpp +++ b/src/DLP.cpp @@ -501,7 +501,8 @@ CPS* DLP::cps(CTRL& ctrl){ pdv->kappa = lg / dgi; pdv->tau = lg * dgi; // gap = pow(sqrt(dot(Lambda, Lambda)) / pdv->tau, 2.0); - gap = dot(Lambda, Lambda); + gap = pow(norm(Lambda.submat(1, 0, Lambda.n_rows - 1, 0)) / pdv->tau, 2.0); + } // end i-loop pdv->x = pdv->x / pdv->tau;