Commit 21c3e90f authored by alexander.dornheim's avatar alexander.dornheim
Browse files

Fixed some small bugs concering introduction of AP_expert, SimpeAlgortim

parent 454213c7
......@@ -10,7 +10,7 @@ from numpy import zeros
from scipy.linalg import norm
from .algorithms import Algorithm
class AP(Algorithm):
class AP_expert(Algorithm):
"""
Alternating Projections
"""
......
......@@ -193,9 +193,6 @@ class SimpleAlgorithm:
elif self.Nz == 1 and u1.ndim > 2:
u1 = u1[:,:,0]
u2 = u2[:,:,0]
else:
u1 = tmp;
u2 = u2;
change = change[1:iter+1];
......
......@@ -9,8 +9,9 @@ The "Algorithms"-module contains all algorithms provided by the ProxToolbox.
#from algorithms import Algorithm
from .AP import *
from .AP_expert import *
from .HPR import *
# from .PALM import *
from .RAAR import *
__all__ = ["AP","HPR","RAAR"]
__all__ = ["AP","HPR","RAAR", "AP_expert"]
......@@ -283,7 +283,7 @@ class Phase(Problem):
return
elif self.config['algorithm'] == 'AP' and self.config['constraint'] == 'support only':
f = h5py.File('Phase_test_data/tasse_supp_u1_ap_' + str(self.config['MAXIT']) + '.mat')
elif self.config['algorithm'] == 'AP' and self.config['constraint'] == 'nonnegative and support':
elif ( self.config['algorithm'] == 'AP' or self.config['algorithm'] == 'AP_expert') and self.config['constraint'] == 'nonnegative and support':
f = h5py.File('Phase_test_data/tasse_u1_ap_' + str(self.config['MAXIT']) + '.mat')
u1 = f['u1'].value.view(np.float64)
......
......@@ -54,7 +54,7 @@ new_config = {
## able to control (without too much damage)
## Algorithm:
'algorithm' : 'AP', # used to be 'Projection',
'algorithm' : 'AP_expert', # used to be 'Projection',
'numruns' : 1, # the only time this parameter will
# be different than 1 is when we are
# benchmarking...not something a normal user
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment