aboutsummaryrefslogtreecommitdiffstats
path: root/jpa_test/rip_condition.py
diff options
context:
space:
mode:
authorjeanpouget-abadie <jean.pougetabadie@gmail.com>2014-12-04 17:17:04 -0500
committerjeanpouget-abadie <jean.pougetabadie@gmail.com>2014-12-04 17:17:04 -0500
commit9c682e64d18c9cddfa2575adc68c57693862b0f5 (patch)
tree1c4995eb353d519d10e12f637d014cd97d3f01ae /jpa_test/rip_condition.py
parent9b8d4dc469f0e45d377684ab1d7bffcb0c289b18 (diff)
downloadcascades-9c682e64d18c9cddfa2575adc68c57693862b0f5.tar.gz
yaron poster
Diffstat (limited to 'jpa_test/rip_condition.py')
-rw-r--r--jpa_test/rip_condition.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/jpa_test/rip_condition.py b/jpa_test/rip_condition.py
index 7c1ce85..fccf9a4 100644
--- a/jpa_test/rip_condition.py
+++ b/jpa_test/rip_condition.py
@@ -10,11 +10,12 @@ def find_kth_rip_constants(M, k):
1 + A_1 = arg max |Mx|_2^2 s.t. |x|_2 = 1 and |x|_0 = k
1 - A_2 = arg min |Mx|_2^2 s.t. |x|_2 = 1 and |x|_0 = kx
"""
- delta = 10
+ delta = 0
+ print M.shape
for col_set in itertools.combinations(xrange(M.shape[1]), k):
M_kcol = M[:,list(col_set)]
delta_upper, delta_lower = upperlower_bound_rip(M_kcol)
- delta = min(delta, min(delta_upper, delta_lower))
+ delta = max(delta, max(delta_upper, delta_lower))
return delta