Skip to content

Commit 3e4a204

Browse files
committed
removed while true loop
1 parent 587aa9a commit 3e4a204

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/SmoothNondegenerate.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ function find_Ssmooth_model(f, M, S_target, params)
2323
# error("f is not smooth")
2424
#end
2525

26-
bool = true
26+
#bool = true
2727
f_transformed = f
28-
while bool
28+
#while bool
29+
num_iter = 100
30+
for i in 1:num_iter
2931
try
3032
pseudo_inverse_mat_new = pseudo_inverse_controlled_lifted(f_transformed,S_target,l,M,params)
3133
bool = false
@@ -34,6 +36,7 @@ function find_Ssmooth_model(f, M, S_target, params)
3436
if isa(e, ArgumentError) && e.msg == "f is not smooth"
3537
throw(ArgumentError("f is not smooth"))
3638
bool = false
39+
return false
3740
else
3841
mat = rand(SLn)
3942
new_vars = matrix(mat) * vars

0 commit comments

Comments
 (0)