1939a9ecc83fe3addda8af054213cc3e0f051abcf4cd6f15259cf298d95dbf41

Download raw

Created: 2023-12-19 03:40:10.302489 UTC

Size: 529

Preview (limited to 512 bytes)

"module Algo.Tridiag ( tridiag ) where\n\nimport Data.Vector.Unboxed as V\n\ntridiag :: (Vector Double, Vector Double, Vector Double, Vector Double)\n -> Vector Double\n{-# NOINLINE tridiag #-}\ntridiag (as,bs,cs,ds) = V.prescanr' (\\(c,d) x' -> d - c*x') 0\n $ V.prescanl' modify (0,0)\n $ V.zip (V.zip as bs) (V.zip cs ds)\n where\n modify (c',d') ((a,b),(c,d)) = \n let id = 1 / (b - c'*a)\n in\n id `seq` (c*i"


Casa is a service provided by the Haskell Foundation │ Originally developed by FP Complete