https://github.com/kul-forbes/ForBES
Revision a1c3894f399980ecae7af600559a9cc24e7b461e authored by Lorenzo Stella on 25 January 2017, 11:25:44 UTC, committed by Lorenzo Stella on 25 January 2017, 11:25:44 UTC
1 parent 7c2519e
Raw File
Tip revision: a1c3894f399980ecae7af600559a9cc24e7b461e authored by Lorenzo Stella on 25 January 2017, 11:25:44 UTC
added function value
Tip revision: a1c3894
Get_DualPoints.m
function [x1, x2, z] = Get_DualPoints(prob, y, gam)

Ax = 0;
if prob.istheref1
    [~, x1] = prob.callf1(prob.C1*y);
    Ax = Ax - prob.C1'*x1;
else
    x1 = [];
end
if prob.istheref2
    [~, x2] = prob.callf2(prob.C2*y);
    Ax = Ax - prob.C2'*x2;
else
    x2 = [];
end
w = -gam*prob.D*(prob.lin - Ax - y/gam);
u = -prob.D'*(prob.callg(w, prob.mu*gam) - w)/(prob.mu*gam);
z = (prob.D*u)/prob.mu;
%w + prob.D'*(proxg(prob.D*w, prob.mu/gam) - prob.D*w)/prob.mu;
%-prob.D'*prob.callg((prob.D*w)/(prob.mu*gam), 1/(prob.mu*gam));
back to top