Copyright | Copyright (c) 2013 David Banas; all rights reserved World wide. |
---|---|

License | BSD3 |

Maintainer | capn.freako@gmail.com |

Stability | Development |

Portability | Uncertain |

Safe Haskell | Safe |

Language | Haskell98 |

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`

- class LogTree2 t a | t -> a where
- evaluator :: LogTree2 t a => t -> SizedVector a -> SizedVector a

- data SizedVector a
- svProd :: Num a => SizedVector a -> SizedVector a -> SizedVector a
- svSum :: Num a => SizedVector a -> SizedVector a -> SizedVector a

# Documentation

class LogTree2 t a | t -> a where Source

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).

evaluator :: LogTree2 t a => t -> SizedVector a -> SizedVector a Source

Evaluates a tree, returning a computation from input to output vectors, where the length of the vectors is encoded in the vector type.

data SizedVector a Source

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.)

Vector_2 a a | A two element vector. |

Vector_4 a a a a | A four element vector. |

Vector_8 a a a a a a a a | An eight element vector. |

Functor SizedVector Source | |

Eq a => Eq (SizedVector a) Source | |

Show a => Show (SizedVector a) Source |

svProd :: Num a => SizedVector a -> SizedVector a -> SizedVector a Source

svSum :: Num a => SizedVector a -> SizedVector a -> SizedVector a Source