From 486b284c502297d466e58a5d410be58d659fe133 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 10 Mar 2017 10:50:13 -0500 Subject: [PATCH] Add helpers for setting the forward/backward vectors. --- src/SES/Myers.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SES/Myers.hs b/src/SES/Myers.hs index 902482b1e..23633eddd 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -91,6 +91,12 @@ middleSnake as bs = M (MiddleSnake as bs) `Then` return data MyersState = MyersState { forward :: !(Vector.Vector Int), backward :: !(Vector.Vector Int) } +setForward :: Vector.Vector Int -> Myers () +setForward v = modify (\ s -> s { forward = v }) + +setBackward :: Vector.Vector Int -> Myers () +setBackward v = modify (\ s -> s { backward = v }) + at :: Vector.Vector Int -> Int -> Endpoint at v k = Endpoint (v Vector.! k) 0 -- FIXME: Bogus.