-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Sequence alignment algorithms. -- -- Global or local sequence alignment, not exclusively for text. @package align @version 0.1.0.0 module Data.Align -- | Aligns two sequences. -- --
--   >>> :{
--   let tr = align
--              (alignConfig (\a b -> if a == b then 1 else (-0.25 :: Double)) 
--                           (-0.5) (-1))
--              (Data.Vector.fromList "dopple")
--              (Data.Vector.fromList "applied")
--   in do
--      print $ traceScore tr
--      putStrLn . debugAlign . trace $ tr
--   :}
--   1.25
--   doppl-e-
--   -applied
--   
align :: (Vector v a, Num s, Eq s, Ord s) => AlignConfig a s -> v a -> v a -> Trace a s data AlignConfig a s alignConfig :: (a -> a -> s) -> s -> s -> AlignConfig a s -- | Either an unmatched item or a match. type Step a = Either (Either a a) (a, a) -- | The result of the alignment. data Trace a s traceScore :: Trace a s -> s trace :: Trace a s -> [Step a] -- | Aligns long streams by performing alignment on windowed sections. windowedAlign :: (Num s, Eq s, Ord s) => AlignConfig a s -> Int -> [a] -> [a] -> [Step a] -- | Utility for displaying a Char-based alignment. debugAlign :: [Step Char] -> String instance (Show a, Show s) => Show (Trace a s)