module TestData.ParenTree where
import qualified Data.Vector.Unboxed as V
parenTree :: Int -> (V.VectorInt, V.VectorInt)
parenTreen = case go ([],[]) 0 (if evenn then n else n+1) of
(ls,rs) -> (V.fromListN (lengthls) (reversels),
V.fromListN (lengthrs) (reversers))
where
go (ls,rs) ij = case j-i of
0 -> (ls,rs)
2 -> (ls',rs')
d -> let k = ((d-2) `div`4) *2
in
go (go (ls',rs') (i+1) (i+1+k)) (i+1+k) (j-1)
where
ls' = i:lsrs' = j-1:rs