Skip to content

Commit

Permalink
Overhaul code for VSDP 2020 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
siko1056 committed Mar 5, 2020
1 parent b2c93cd commit fdee173
Show file tree
Hide file tree
Showing 50 changed files with 64 additions and 66 deletions.
5 changes: 2 additions & 3 deletions +solver/csdp.m
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
classdef csdp < handle
% CSDP Solver proxy class (not the acutal solver!).
% CSDP Solver proxy class (not the actual solver!).
%
% For more information about CSDP, see:
%
% https://projects.coin-or.org/Csdp/
% https://github.com/coin-or/Csdp
%
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function obj = solve (obj, sol_type)
% SOLVE Approximately solve conic problem instance with CSDP.
Expand Down
4 changes: 2 additions & 2 deletions +solver/glpk.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef glpk < handle
% GLPK Solver proxy class (not the acutal solver!).
% GLPK Solver proxy class (not the actual solver!).
%
% For more information about GLPK, see:
%
Expand All @@ -8,8 +8,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function obj = solve (obj, sol_type)
% SOLVE Approximately solve conic problem instance with GLPK.
Expand Down
4 changes: 2 additions & 2 deletions +solver/intlab.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef intlab < handle
% INTLAB Solver proxy class (not the acutal solver!).
% INTLAB Solver proxy class (not the actual solver!).
%
% For information about INTLAB, see:
%
Expand All @@ -8,8 +8,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function spath = install (varargin)
% Returns the path to the installed and usable solver. Otherwise return
Expand Down
4 changes: 2 additions & 2 deletions +solver/linprog.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef linprog < handle
% LINPROG Solver proxy class (not the acutal solver!).
% LINPROG Solver proxy class (not the actual solver!).
%
% For more information about LINPROG, see:
%
Expand All @@ -8,8 +8,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function obj = solve (obj, sol_type)
% SOLVE Approximately solve conic problem instance with LINPROG.
Expand Down
4 changes: 2 additions & 2 deletions +solver/lp_solve.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef lp_solve < handle
% LP_SOLVE Solver proxy class (not the acutal solver!).
% LP_SOLVE Solver proxy class (not the actual solver!).
%
% For more information about LP_SOLVE, see:
%
Expand All @@ -8,8 +8,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function obj = solve (obj, sol_type)
% SOLVE Approximately solve conic problem instance with LP_SOLVE.
Expand Down
4 changes: 2 additions & 2 deletions +solver/mosek.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef mosek < handle
% MOSEK Solver proxy class (not the acutal solver!).
% MOSEK Solver proxy class (not the actual solver!).
%
% For more information on the MOSEK format, see:
%
Expand All @@ -8,8 +8,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function obj = solve (obj, sol_type)
% SOLVE Approximately solve conic problem instance with MOSEK.
Expand Down
2 changes: 1 addition & 1 deletion +solver/registry.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function slist = list_all ()
% LIST_ALL Return a list with all solvers supported by VSDP.
Expand Down
4 changes: 2 additions & 2 deletions +solver/sdpa.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef sdpa < handle
% SDPA Solver proxy class (not the acutal solver!).
% SDPA Solver proxy class (not the actual solver!).
%
% For more information on the SDPA-M format, see:
%
Expand All @@ -9,8 +9,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function obj = solve (obj, sol_type)
% SOLVE Approximately solve conic problem instance with SDPA.
Expand Down
6 changes: 3 additions & 3 deletions +solver/sdpt3.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef sdpt3 < handle
% SDPT3 Solver proxy class (not the acutal solver!).
% SDPT3 Solver proxy class (not the actual solver!).
%
% For information about SDPT3, see:
%
Expand All @@ -9,8 +9,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function obj = solve (obj, sol_type)
% SOLVE Approximately solve conic problem instance with SDPT3.
Expand Down Expand Up @@ -110,7 +110,7 @@
spath = solver.registry.generic_install (sname, is_available, ...
get_path, installer_file, do_error);

% Return on sucess or non-interactive silent mode.
% Return on success or non-interactive silent mode.
if ((nargin == 0) || (~isempty (spath)))
return;
end
Expand Down
6 changes: 3 additions & 3 deletions +solver/sedumi.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef sedumi < handle
% SEDUMI Solver proxy class (not the acutal solver!).
% SEDUMI Solver proxy class (not the actual solver!).
%
% For information about SeDuMi, see:
%
Expand All @@ -9,8 +9,8 @@
% See also vsdp.solve.
%

% Copyright 2004-2019 Christian Jansson ([email protected])

% Copyright 2004-2020 Christian Jansson ([email protected])
methods (Static)
function obj = solve (obj, sol_type)
% SOLVE Approximately solve conic problem instance with SeDuMi.
Expand Down Expand Up @@ -101,7 +101,7 @@
spath = solver.registry.generic_install (sname, is_available, ...
get_path, installer_file, do_error);

% Return on sucess or non-interactive silent mode.
% Return on success or non-interactive silent mode.
if ((nargin == 0) || (~isempty (spath)))
return;
end
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/add_solution.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
%
% See also vsdp, vsdp_solution.

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

if (nargin == 2)
if (~isa (varargin{1}, 'vsdp_solution'))
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/analyze.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
% See also vsdp.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk (1, 3);
if (nargout ~= 1)
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/cache.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
% See also vsdp.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk (2, 2);

Expand Down
2 changes: 1 addition & 1 deletion @vsdp/cell2mat.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
% See also vsdp.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

if (iscell (X))
x = cell2mat (cellfun (@(x) x(:), X, 'UniformOutput', false));
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/cell_sub_blocks.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
% See also vsdp, vsdp.cell2mat.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

if (nargin == 2 && iscell (X) && iscell (blk))
idx = find (strcmp (blk(:,1), 's') & (cellfun (@length, blk(:,2)) > 1));
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/check_dual_infeasible.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
% vsdp.check_primal_infeasible.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk (1, 2);

Expand Down
2 changes: 1 addition & 1 deletion @vsdp/check_primal_infeasible.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
% vsdp.check_dual_infeasible.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk (1, 2);

Expand Down
2 changes: 1 addition & 1 deletion @vsdp/disp.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function disp (obj)
%
% See also vsdp.info.

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

% Determine object name.
obj_name = inputname(1);
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/from_2006_fmt.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
%
% See also vsdp.

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk (4, 7);

Expand Down
2 changes: 1 addition & 1 deletion @vsdp/from_lp_solve_fmt.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
% See also from_mps_file.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk(4, 6);
b = b(:);
Expand Down
4 changes: 2 additions & 2 deletions @vsdp/from_mps_file.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
% See also from_lp_solve_fmt.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk(1, 1);
if (exist (fname, 'file') ~= 2)
Expand Down Expand Up @@ -110,7 +110,7 @@
% columns i, j and k are in an SOS2 set
%

% Copyright 2004-2012 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

% initialize default output
problem.name = '';
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/from_sdpa_file.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
% See also vsdp.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk(1, 2);
if (exist (fname, 'file') ~= 2)
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/from_sdpa_fmt.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
%
% See also from_sdpa_file.

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk(3, 6);
if (isempty (bLOCKsTRUCT))
Expand Down
5 changes: 2 additions & 3 deletions @vsdp/from_sdpt3_fmt.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@
%
% For more information on the SDPT3-4.0 format, see:
%
% [1] http://www.math.nus.edu.sg/~mattohkc/sdpt3/guide4-0-draft.pdf
% [2] http://www.math.nus.edu.sg/~mattohkc/sdpt3/sdpexample.html
% https://blog.nus.edu.sg/mattohkc/files/2019/10/guide4-0-draft.pdf
%
% See also vsdp.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk(4, 7);

Expand Down
2 changes: 1 addition & 1 deletion @vsdp/get_midpoint_problem_data.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% See also vsdp.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

[At, b, c] = deal (mid (obj.At), mid (obj.b), mid (obj.c));
if ((nargin > 1) && ~strcmp (sol_type, "Approximate"))
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/info.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function info (obj)
% See also vsdp.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

% Short conic programming theory.
fprintf ('\n VSDP conic programming problem in primal (P) dual (D) form:\n\n');
Expand Down
2 changes: 1 addition & 1 deletion @vsdp/rigorous_lower_bound.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
% See also vsdp, vsdp.rigorous_upper_bound.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

narginchk (1, 2);

Expand Down
2 changes: 1 addition & 1 deletion @vsdp/rigorous_lower_cone_bound.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
% See also vsdp, vsdp.rigorous_lower_bound, vsdp.rigorous_upper_bound.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

n = obj.K.f + obj.K.l + length (obj.K.q) + length (obj.K.s);

Expand Down
2 changes: 1 addition & 1 deletion @vsdp/rigorous_upper_bound.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
% See also vsdp, vsdp.rigorous_lower_bound.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

% Validate dual upper bounds.
if (nargin == 2)
Expand Down
4 changes: 2 additions & 2 deletions @vsdp/settings.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% val = vsdp.settings ('id', 'key');
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

persistent vsdp_settings; % In memory copy of VSDP settings file.
persistent settings_file;
Expand Down Expand Up @@ -51,5 +51,5 @@
% SYS_HASH Compute a system unique hash value.
%

val = sum (double ([computer(), '_vsdp_2018_', version()]));
val = sum (double ([computer(), '_vsdp_2020_', version()]));
end
2 changes: 1 addition & 1 deletion @vsdp/sindex.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
% See also vsdp, vsdp.svec, vsdp.smat.
%

% Copyright 2004-2019 Christian Jansson ([email protected])
% Copyright 2004-2020 Christian Jansson ([email protected])

if (isa (obj, 'vsdp'))
K = obj.K;
Expand Down
Loading

0 comments on commit fdee173

Please sign in to comment.