Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nam
ProxPython
Commits
21c3e90f
Commit
21c3e90f
authored
Aug 29, 2017
by
alexander.dornheim
Browse files
Fixed some small bugs concering introduction of AP_expert, SimpeAlgortim
parent
454213c7
Changes
5
Hide whitespace changes
Inline
Side-by-side
proxtoolbox/Algorithms/AP_expert.py
View file @
21c3e90f
...
...
@@ -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
"""
...
...
proxtoolbox/Algorithms/SimpleAlgortihm.py
View file @
21c3e90f
...
...
@@ -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
];
...
...
proxtoolbox/Algorithms/__init__.py
View file @
21c3e90f
...
...
@@ -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"
]
proxtoolbox/Problems/Phase/phase.py
View file @
21c3e90f
...
...
@@ -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
)
...
...
proxtoolbox/Problems/Phase/tasse_ap_in.py
View file @
21c3e90f
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment