-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Visualization of computation decomposition trees. -- -- This Haskell package provides some tools for visualizing the -- decomposition of different divide and conquer algorithms. @package treeviz @version 2.0.2 -- | Typical usage (a 4-point FFT, using 2 radix-2, DIT stages): -- --
-- -- Main -- exeMain = do -- let tData = newTreeData [(2, False), (2, False)] [1.0, 0.0, 0.0, 0.0] -- let tree = buildTree newFFTTree tData -- case tree of -- Left msg -> putStrLn msg -- Right _ -> do -- -- If you're interested in the numerical result: -- let res = getEval tree -- putStrLn $ "Result = tt" ++ show res -- -- If you want to visualize how the computation breaks down: -- let (treePlot, legendPlot) = dotLogTree tree -- writeFile treeFileName treePlot -- writeFile legendFileName legendPlot ---- -- And, to get easily viewable *.PNGs from the two files written, above: -- --
-- >>> dot <treeFileName> -Tpng >tree.png ---- --
-- >>> dot <legendFileName> -Tpng >legend.png --module Data.Tree.LogTree2 -- | A class of tree structures representing logarithmic decomposition of -- arbitrary radix and using either decimation-in-time (DIT), or -- decimation-in-frequency (DIF) approach (or, a mix of both). class LogTree2 t a | t -> a -- | Evaluates a tree, returning a computation from input to output -- vectors, where the length of the vectors is encoded in the vector -- type. evaluator :: (LogTree2 t a, LogTree2 t a) => t -> SizedVector a -> SizedVector a -- | Enumerates the allowed input/output vector sizes. -- -- (My hope is that we'll find a way to do away with this need of -- explicit I/O vector size enumeration.) data SizedVector a -- | A two element vector. Vector_2 :: a -> a -> SizedVector a -- | A four element vector. Vector_4 :: a -> a -> a -> a -> SizedVector a -- | An eight element vector. Vector_8 :: a -> a -> a -> a -> a -> a -> a -> a -> SizedVector a svProd :: Num a => SizedVector a -> SizedVector a -> SizedVector a svSum :: Num a => SizedVector a -> SizedVector a -> SizedVector a instance GHC.Show.Show a => GHC.Show.Show (Data.Tree.LogTree2.SizedVector a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Tree.LogTree2.SizedVector a) instance GHC.Base.Functor Data.Tree.LogTree2.SizedVector module Data.Newtypes.PrettyDouble -- | A custom double precision floating point type, which overides the -- Show and Eq instances, in order to: -- --