Skip to content

Commit

Permalink
Overhaul remaining 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 fdee173 commit 4c75ff9
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark/add_benchmark.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
% See also vsdp_benchmark.
%

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

% Recursive call with well-known benchmarks.
if (nargin == 2)
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark/disp.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function disp (obj, item)
% See also vsdp_benchmark.
%

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

if (nargin > 1)
item = validatestring (item, {'system', 'solver', 'benchmark'});
Expand Down
4 changes: 2 additions & 2 deletions test/@vsdp_benchmark/filter.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%
% obj.filter (bm_library, name) Optionally, the benchmark can be reduced to
% a subset of the data by applying filters, i.e. regular expressions
% machted with the "regexp()" function. To filter the benchmark library
% matched with the "regexp()" function. To filter the benchmark library
% provide a string for 'bm_library' and for the test case name set 'name'.
%
% Example:
Expand All @@ -20,7 +20,7 @@
% See also vsdp_benchmark.
%

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

idx = true (size (obj.BENCHMARK(:,1)));
if (isempty (idx))
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark/run.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
% See also vsdp_benchmark, vsdp_benchmark.filter.
%

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

if (isempty (obj.RESULT_DIR))
error ('VSDP_BENCHMARK:run:resultDirUnknown', ...
Expand Down
6 changes: 3 additions & 3 deletions test/@vsdp_benchmark/vsdp_benchmark.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
% See also vsdp.
%

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

% Copyright 2004-2020 Christian Jansson ([email protected])
properties
% A cell array of strings with VSDP benchmarks to run. The columns are:
%
% obj.BENCHMARK(:,1) Benchmark library name.
% obj.BENCHMARK(:,2) Short name for the test case.
% obj.BENCHMARK(:,3) System dependend full path of the original test
% obj.BENCHMARK(:,3) System dependent full path of the original test
% case data.
%
% Default: cell (0, 3).
Expand Down Expand Up @@ -87,8 +87,8 @@
function p = check_dir (~, p)
% CHECK_DIR Check 'p' to be an existing directory.
%
% Return the absolute path 'p' or an emtpy char array.

% Return the absolute path 'p' or an empty char array.
if (exist (p, "dir") == 7)
p = what (p); % Get absolute path.
p = p.path;
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/columns.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function obj = columns (obj, names)
% COLUMNS Use specified columns by header names or indices.

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

if (isnumeric (names) || islogical (names))
obj.cdata_view = obj.cdata_view(:,names);
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/disp.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function disp (obj)
% DISP Display short export overview.

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

fprintf ('\n VSDP Benchmark Export\n\n');
fprintf (' obj.RESULT_DIR =\n\n ''%s''\n\n', obj.RESULT_DIR);
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/get_data.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function obj = get_data (obj)
% GET_DATA Get the data for the listed test cases.

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

obj.cdata{1,16} = []; % Preallocate width
len = size (obj.cdata, 1);
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/get_test_cases.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
% with format {'lib', 'test case', 'solver'}.
%

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

file_list = dir (fullfile (obj.RESULT_DIR, 'data', '*.mat'));
idx = {file_list.name}';
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/rows.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
% regular expression to be matched.
%

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

if (isnumeric (op) || islogical (op))
obj.cdata_view = obj.cdata_view(op,:);
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/to_cell_strings.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% The second input 'use_columns' determines the string conversion.
%

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

if (all (all (cellfun (@ischar, obj.cdata_view))))
return; % All done.
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/to_csv.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function str = to_csv (obj)
% TO_CSV Export 'obj.cdata_view' to comma separated values (CSV).

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

% Ensure string entries.
cdata = obj.to_cell_strings ().cdata_view;
Expand Down
4 changes: 2 additions & 2 deletions test/@vsdp_benchmark_exporter/to_html.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function str = to_html (obj, html_title)
% TO_HTML Export 'cdata' to rich HTML markup (MathJax, jQuery, dataTables).

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

% Ensure string entries.
cdata = obj.to_cell_strings ().cdata_view;
Expand All @@ -24,7 +24,7 @@
end

datatables_url = ...
'https://cdn.datatables.net/v/dt/jq-3.3.1/dt-1.10.18/fh-3.1.4/sl-1.3.0/datatables.min';
'https://cdn.datatables.net/v/dt/jq-3.3.1/dt-1.10.20/fh-3.1.6/sl-1.3.1/datatables.min';

header = strjoin ({ ...
'<!DOCTYPE html>', ...
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/to_latex.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function str = to_latex (obj, body_only)
% TO_LATEX Export 'obj.cdata_view' to LaTeX markup (longtable environment).

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

% Ensure string entries.
cdata = obj.to_cell_strings ().cdata_view;
Expand Down
2 changes: 1 addition & 1 deletion test/@vsdp_benchmark_exporter/to_markdown.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function str = to_markdown (obj)
% TO_MARKDOWN Export 'obj.cdata_view' to Markdown format.

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])
% Copyright 2018-2020 Kai T. Ohlhus ([email protected])

% Ensure string entries.
cdata = obj.to_cell_strings ().cdata_view;
Expand Down
4 changes: 2 additions & 2 deletions test/@vsdp_benchmark_exporter/vsdp_benchmark_exporter.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
% Helper class to export benchmarks.
%

% Copyright 2018-2019 Kai T. Ohlhus ([email protected])

% Copyright 2018-2020 Kai T. Ohlhus ([email protected])
properties
% Current view of the data to be exported.
%
Expand Down Expand Up @@ -111,8 +111,8 @@ function save_cache (obj)
function p = check_dir (~, p)
% CHECK_DIR Check 'p' to be an existing directory.
%
% Return the absolute path 'p' or an emtpy char array.

% Return the absolute path 'p' or an empty char array.
if (exist (p, "dir") == 7)
p = what (p); % Get absolute path.
p = p.path;
Expand Down
4 changes: 2 additions & 2 deletions test/testVSDP.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function tests = testVSDP()
% TESTVSDP Runs a testsuite for VSDP (version 2018).
% TESTVSDP Runs a testsuite for VSDP (version 2020).
%
% Example:
%
Expand All @@ -9,7 +9,7 @@
% See also vsdp.
%

% Copyright 2016-2019 Kai T. Ohlhus ([email protected])
% Copyright 2016-2020 Kai T. Ohlhus ([email protected])

tests = functiontests (localfunctions);
end
Expand Down
2 changes: 1 addition & 1 deletion test/testVSDP2006.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
% See also demovsdp.
%

% Copyright 2016-2019 Kai T. Ohlhus ([email protected])
% Copyright 2016-2020 Kai T. Ohlhus ([email protected])

tests = functiontests(localfunctions);
end
Expand Down
2 changes: 1 addition & 1 deletion test/testVSDP_SDP.m
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function SDP_Jansson2007a_P192 (testCase)
yu = 1e5 * [1 1 1 1]';

% An evaluation of Jansson2007a (p. 193) yields for EPSILON = 2e-4
% the values X_22 = 5000, X_33 = 0 and y, repectivly.
% the values X_22 = 5000, X_33 = 0 and y, respectively.
x_sol = [ EPSILON; -1; 0;
-1; 1/EPSILON; 0;
0; 0; 0 ];
Expand Down
2 changes: 1 addition & 1 deletion test/testVSDP_svec_smat.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function testVSDP_svec_smat (testCase)

% Unsymmetric matrix.
% Not symmetric matrix.
A = [...
11, 12, 13, 14; ...
21, 22, 23, 24; ...
Expand Down
4 changes: 2 additions & 2 deletions vsdp_indexable.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
classdef vsdp_indexable < handle
% VSDP_INDEXABLE A quantity that can be separated into differrent cones.
% VSDP_INDEXABLE A quantity that can be separated into different cones.
%
% Example:
%
Expand All @@ -11,8 +11,8 @@
% See also vsdp.
%

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

% Copyright 2004-2020 Christian Jansson ([email protected])
properties
value
vsdp_obj
Expand Down
2 changes: 1 addition & 1 deletion vsdp_options.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
%
% See also vsdp.

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

% Copyright 2004-2020 Christian Jansson ([email protected])
narginchk (0, 1);

% Check for default solver by explicitly setting it again.
Expand Down
4 changes: 2 additions & 2 deletions vsdp_solution.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
%
% See also vsdp.

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

% Copyright 2004-2020 Christian Jansson ([email protected])
narginchk (4, 6);

obj.sol_type = validatestring (sol_type, {'Initial', ...
Expand Down Expand Up @@ -235,7 +235,7 @@ function mem_info (obj)
% TO_2006_FMT Export conic problem solution to VSDP 2006 format.
%
% [X0, y0, Z0] = sol.to_2006_fmt (obj); Export the solution 'sol' of
% a VSDP 2018 conic problem 'obj' to VSDP 2006 format.
% a VSDP 2020 conic problem 'obj' to VSDP 2006 format.
%
% See also vsdp, vsdp_solution.
%
Expand Down

0 comments on commit 4c75ff9

Please sign in to comment.