Skip to content

Commit a20a435

Browse files
author
Manuel Bärenz
committed
Formatting
1 parent 342fa33 commit a20a435

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Control/Monad/Bayes/Population.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ where
4141

4242
import Control.Applicative (Alternative)
4343
import Control.Arrow (second)
44-
import Control.Monad (replicateM, MonadPlus)
44+
import Control.Monad (MonadPlus, replicateM)
4545
import Control.Monad.Bayes.Class
4646
( MonadDistribution (categorical, logCategorical, random, uniform),
4747
MonadFactor,
@@ -185,11 +185,11 @@ stratified weights = do
185185
cumulativeSum = V.scanl (+) 0.0 weights
186186
coalg (i, j)
187187
| i < bigN =
188-
if (positions ! i) < (cumulativeSum ! j)
189-
then Just (Just j, (i + 1, j))
190-
else Just (Nothing, (i, j + 1))
188+
if (positions ! i) < (cumulativeSum ! j)
189+
then Just (Just j, (i + 1, j))
190+
else Just (Nothing, (i, j + 1))
191191
| otherwise =
192-
Nothing
192+
Nothing
193193
return $ map (\i -> i - 1) $ catMaybes $ unfoldr coalg (0, 0)
194194

195195
-- | Resample the population using the underlying monad and a stratified resampling scheme.

0 commit comments

Comments
 (0)