Skip to content

Instantly share code, notes, and snippets.

@stephenjbarr
Created April 8, 2014 20:23
Show Gist options
  • Save stephenjbarr/10185661 to your computer and use it in GitHub Desktop.
Save stephenjbarr/10185661 to your computer and use it in GitHub Desktop.
inner_decentral_sino_st :: ProblemParams -> (Double,Double,Double) -> (Double,Double,Double)
inner_decentral_sino_st pp (simin, simed, simax) = (simin', simed', simax')
where
p = fromIntegral $ _pp_p pp :: Double
t = fromIntegral $ _pp_t pp :: Double
h = fromIntegral $ _pp_h pp :: Double
myf_val = myfunN1 simed pp
thresh = (p*t)/(p+h)
if myf_val < thresh then
(simin', simax') = (simed, simax)
else
(simin', simax') = (simin, simed)
simed' = average simin' simax'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment