Skip to content

Commit

Permalink
Modified gap computation, still to check
Browse files Browse the repository at this point in the history
  • Loading branch information
bpfaff committed Apr 24, 2020
1 parent 43e704a commit 8a7b2a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]"), 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 <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion R/ctrl.R
Original file line number Diff line number Diff line change
@@ -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)){
Expand Down
2 changes: 1 addition & 1 deletion man/ctrl.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
3 changes: 2 additions & 1 deletion src/DLP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8a7b2a6

Please sign in to comment.