Gaussian elimination: Difference between revisions

Content added Content deleted
Line 1,499: Line 1,499:
bubble (xs,bs) = (go xs, go bs)
bubble (xs,bs) = (go xs, go bs)
where
where
idmax = snd.maximum.flip zip [0..].map (negate.abs.head) $ xs
idmax = snd.maximum.flip zip [0..].map (abs.head) $ xs
go ys = let (us,vs) = splitAt idmax ys in vs ++ us
go ys = let (us,vs) = splitAt idmax ys in vs ++ us