Mercurial > hg > smallbox
comparison examples/SMALL_solver_test.m @ 41:83de4ea524df
(none)
author | idamnjanovic |
---|---|
date | Mon, 14 Mar 2011 15:41:04 +0000 |
parents | cbf3521c25eb |
children | 4302a91e6033 |
comparison
equal
deleted
inserted
replaced
40:6416fc12f2b8 | 41:83de4ea524df |
---|---|
55 | 55 |
56 fprintf('\n\nExample test of SMALL solvers against their counterparts on Sparco problems.\n\n'); | 56 fprintf('\n\nExample test of SMALL solvers against their counterparts on Sparco problems.\n\n'); |
57 | 57 |
58 %% | 58 %% |
59 % Generate SPARCO problem | 59 % Generate SPARCO problem |
60 | 60 clear |
61 | 61 |
62 SMALL.Problem = generateProblem(6, 'P', 6, 'm', 270,'n',1024, 'show'); | 62 SMALL.Problem = generateProblem(6, 'P', 6, 'm', 270,'n',1024, 'show'); |
63 %% | 63 %% |
64 i=1; | 64 i=1; |
65 % %% | 65 % %% |
78 % SMALL.solver(i)=SMALL_solve(SMALL.Problem,SMALL.solver(i)); | 78 % SMALL.solver(i)=SMALL_solve(SMALL.Problem,SMALL.solver(i)); |
79 % | 79 % |
80 % | 80 % |
81 % i=i+1; | 81 % i=i+1; |
82 %% | 82 %% |
83 % SMALL OMP with Cholesky update test | 83 % SMALL Conjugate Gradient test |
84 SMALL.solver(i)=SMALL_init_solver; | 84 SMALL.solver(i)=SMALL_init_solver; |
85 SMALL.solver(i).toolbox='SMALL'; | 85 SMALL.solver(i).toolbox='SMALL'; |
86 SMALL.solver(i).name='SMALL_chol'; | 86 SMALL.solver(i).name='SMALL_cgp'; |
87 | 87 |
88 % In the following string all parameters except matrix, measurement vector | 88 % In the following string all parameters except matrix, measurement vector |
89 % and size of solution need to be specified. If you are not sure which | 89 % and size of solution need to be specified. If you are not sure which |
90 % parameters are needed for particular solver type "help <Solver name>" in | 90 % parameters are needed for particular solver type "help <Solver name>" in |
91 % MATLAB command line | 91 % MATLAB command line |
92 | 92 |
93 SMALL.solver(i).param='200, 1e-14'; | 93 SMALL.solver(i).param='200, 1e-14'; |
94 | 94 |
95 SMALL.solver(i)=SMALL_solve(SMALL.Problem, SMALL.solver(i)); | 95 SMALL.solver(i)=SMALL_solve(SMALL.Problem,SMALL.solver(i)); |
96 | |
96 | 97 |
97 i=i+1; | 98 i=i+1; |
99 | |
98 %% | 100 %% |
99 % SolveOMP from SparseLab test | 101 % SolveOMP from SparseLab test |
100 | 102 |
101 SMALL.solver(i)=SMALL_init_solver; | 103 SMALL.solver(i)=SMALL_init_solver; |
102 SMALL.solver(i).toolbox='SparseLab'; | 104 SMALL.solver(i).toolbox='SparseLab'; |
111 | 113 |
112 SMALL.solver(i)=SMALL_solve(SMALL.Problem, SMALL.solver(i)); | 114 SMALL.solver(i)=SMALL_solve(SMALL.Problem, SMALL.solver(i)); |
113 | 115 |
114 i=i+1; | 116 i=i+1; |
115 | 117 |
118 %% | |
119 % SMALL OMP with Cholesky update test | |
120 SMALL.solver(i)=SMALL_init_solver; | |
121 SMALL.solver(i).toolbox='SMALL'; | |
122 SMALL.solver(i).name='SMALL_chol'; | |
123 | |
124 % In the following string all parameters except matrix, measurement vector | |
125 % and size of solution need to be specified. If you are not sure which | |
126 % parameters are needed for particular solver type "help <Solver name>" in | |
127 % MATLAB command line | |
128 | |
129 SMALL.solver(i).param='200, 1e-14'; | |
130 | |
131 SMALL.solver(i)=SMALL_solve(SMALL.Problem, SMALL.solver(i)); | |
132 | |
133 i=i+1; | |
134 | |
116 %% | 135 %% |
117 % greed_pcgp from Sparsify test | 136 % greed_pcgp from Sparsify test |
118 | 137 |
119 SMALL.solver(i)=SMALL_init_solver; | 138 SMALL.solver(i)=SMALL_init_solver; |
120 SMALL.solver(i).toolbox='Sparsify'; | 139 SMALL.solver(i).toolbox='Sparsify'; |