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
forbes_test.m
function forbes_test()

% add path
addpath(fullfile(fileparts(mfilename('fullpath')), 'tests'));

fprintf('* testing library functions:\n');

fprintf('%40s', 'sumOp... ');                       tic(); test_sumOp;                        fprintf('OK (%5.2f s)\n', toc());
fprintf('%40s', 'stackOp... ');                     tic(); test_stackOp;                      fprintf('OK (%5.2f s)\n', toc());
fprintf('%40s', 'separableSum... ');                tic(); test_separableSum;                 fprintf('OK (%5.2f s)\n', toc());
fprintf('%40s', 'quadratic... ');                   tic(); test_quadratic;                    fprintf('OK (%5.2f s)\n', toc());

fprintf('* testing solver utilities:\n');

fprintf('%40s', 'MakeProblem... ');                 tic(); test_MakeProblem;                  fprintf('OK (%5.2f s)\n', toc());
fprintf('%40s', 'CheckGamma... ');                  tic(); test_CheckGamma;                   fprintf('OK (%5.2f s)\n', toc());
fprintf('%40s', 'LineFBE... ');                     tic(); test_LineFBE;                      fprintf('OK (%5.2f s)\n', toc());
fprintf('%40s', 'SegmentFBE... ');                  tic(); test_SegmentFBE;                   fprintf('OK (%5.2f s)\n', toc());

fprintf('* testing composite problems:\n');

fprintf('%36s', 'SolveLasso_small');                tic(); test_SolveLasso_small;             fprintf(' OK (%5.2f s)\n', toc());
fprintf('%36s', 'SolveLasso_random');               tic(); test_SolveLasso_random;            fprintf(' OK (%5.2f s)\n', toc());
fprintf('%36s', 'SolveSparseLogReg_small');         tic(); test_SolveSparseLogReg_small ;     fprintf(' OK (%5.2f s)\n', toc());
fprintf('%36s', 'SolveNuclearNormMC_random');	    tic(); test_SolveNuclearNormMC_random;    fprintf(' OK (%5.2f s)\n', toc());
fprintf('%36s', 'SolveRankConstrMC_random');	    tic(); test_SolveRankConstrMC_random;     fprintf(' OK (%5.2f s)\n', toc());

fprintf('* testing separable problems:\n');

fprintf('%36s', 'SolveSVM_random');                 tic(); test_SolveSVM_random;              fprintf(' OK (%5.2f s)\n', toc());
fprintf('%36s', 'SolveQP_random');                  tic(); test_SolveQP_random;               fprintf(' OK (%5.2f s)\n', toc());

rmpath(fullfile(fileparts(mfilename('fullpath')), 'tests'));
back to top