Commit 6ac4e555 authored by AVANZINI Martin's avatar AVANZINI Martin
Browse files

added nest examples; thanks Michi

parent cfde87e2
def seq ():
var n, x, r
var n, x1, x2, r
x = n
while x >= 0:
x = x + unif(-2,1)
x1 = n
while x1 > 0:
x1 = x1 + unif(-2,1)
tick 1
x = n
while x >= 0:
x = x + unif(-2,1)
x2 = n
while x2 > 0:
x2 = x2 + unif(-2,1)
tick 1
def seq ():
var n, x, r
var n, x1, x2, r
x = n
while x >= 0:
while x1 > 0:
r = unif(-2,1)
x = x + r
x1 = x1 + r
tick 1
x = n
while x >= 0:
x2 = n
while x2 > 0:
r = unif(-2,1)
x = x + r
x2 = x2 + r
tick 1
def seq ():
var n, x, r
var n, x1, x2, x3, r
x = n
while x >= 0:
x = x + unif(-2,1)
x1 = n
while x1 > 0:
x1 = x1 + unif(-2,1)
tick 1
x = n
while x >= 0:
x = x + unif(-2,1)
x2 = n
while x2 > 0:
x2 = x2 + unif(-2,1)
tick 1
x = n
while x >= 0:
x = x + unif(-2,1)
x3 = n
while x3 > 0:
x3 = x3 + unif(-2,1)
tick 1
def seq ():
var n, x, r
var n, x1, x2, x3, r
x = n
while x >= 0:
while x1 > 0:
r = unif(-2,1)
x = x + r
x1 = x1 + r
tick 1
x = n
while x >= 0:
x2 = n
while x2 > 0:
r = unif(-2,1)
x = x + r
x2 = x2 + r
tick 1
x = n
while x >= 0:
x3 = n
while x3 > 0:
r = unif(-2,1)
x = x + r
x3 = x3 + r
tick 1
def seq ():
var n, x1, x2, x3, x4, r
x1 = n
while x1 > 0:
x1 = x1 + unif(-2,1)
tick 1
x2 = n
while x2 > 0:
x2 = x2 + unif(-2,1)
tick 1
x3 = n
while x3 > 0:
x3 = x3 + unif(-2,1)
tick 1
x4 = n
while x4 > 0:
x4 = x4 + unif(-2,1)
tick 1
def seq ():
var n, x1, x2, x3, x4, r
x = n
while x1 > 0:
r = unif(-2,1)
x1 = x1 + r
tick 1
x2 = n
while x2 > 0:
r = unif(-2,1)
x2 = x2 + r
tick 1
x3 = n
while x3 > 0:
r = unif(-2,1)
x3 = x3 + r
tick 1
x4 = n
while x4 > 0:
r = unif(-2,1)
x4 = x4 + r
tick 1
......@@ -319,7 +319,7 @@ extractRanking body i c g f = fmap templateToNorms $ do
<|> template "shift-max" (refine shiftMax lin)
<|> template "mixed-lin" (pure (grdNorm * lin + lin))
<|> template "mixed-square" (pure (grdNorm * grdNorm + lin))
<|> template "square" (pure (lin * lin + lin))
<|> template "square-shift-max" ((\a -> lin * lin + a) <$> refine shiftMax lin)
where
refine m r = do
r' <- m r
......
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