-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Some special functions to work with Vector (with zip). -- -- Uses normalizitions inside for the tuples. Can be used to generate a -- Vector of 2D function points. @package vector-doublezip @version 0.1.0.0 -- | Maintainer : olexandr543@yahoo.com -- -- Some special functions to work with Vector (with zip). module Data.Vector.DoubleZip -- | Norms a tuples in a Vector by their first elements so that the -- greatest by an absolute value first element is equal to 1 (or -1). If -- all the first elements are zeros then prints a warning message and -- exits successfully. normFst :: (Fractional a, Ord a) => Vector (a, b) -> IO (Vector (a, b)) -- | Norms a tuples in a Vector by their second elements so that the -- greatest by an absolute value second element is equal to 1 (or -1). If -- all the second elements are zeros then prints a warning message and -- exits successfully. normSnd :: (Fractional b, Ord b) => Vector (a, b) -> IO (Vector (a, b)) -- | A special function transformation to obtain the resulting -- Vector so that its first elements in the inner tuples are in a -- special way normed to 1 (or -1) by normFst and the inner tuples -- are sequenced one by another as a 2D points of the generating function -- f :: a -> b. To obtain non-empty result the given second -- argument must have at least two elements. evalFstFV :: (Fractional a, Ord a) => (a -> b) -> Vector a -> IO (Vector ((a, b), (a, b))) -- | The same as evalFstFV but uses a monadic IO function f. evalFstFVM :: (Fractional a, Ord a) => (a -> IO b) -> Vector a -> IO (Vector ((a, b), (a, b))) -- | A special function transformation to obtain the resulting -- Vector so that its second elements in the inner tuples are in a -- special way normed to 1 (or -1) by normSnd and the inner tuples -- are sequenced one by another as a 2D points of the generating function -- f :: a -> b. To obtain non-empty result the given second -- argument must have at least two elements. Is similar to -- evalFstFV. evalSndFV :: (Fractional b, Ord b) => (a -> b) -> Vector a -> IO (Vector ((a, b), (a, b))) -- | The same as evalSndFV but uses a monadic IO function f. evalSndFVM :: (Fractional b, Ord b) => (a -> IO b) -> Vector a -> IO (Vector ((a, b), (a, b)))