| Safe Haskell | None | 
|---|---|
| Language | Haskell98 | 
Data.Matrix.Quad
- data Shape
 - data Shape' :: Shape -> * where
 - data SomeShape where
 - data Mat :: Shape -> Shape -> * -> * where
 - data Vec :: Shape -> * -> * where
 - row :: Mat x1 Leaf a -> Mat x2 Leaf a -> Mat (Bin x1 x2) Leaf a
 - col :: Mat Leaf y1 a -> Mat Leaf y2 a -> Mat Leaf (Bin y1 y2) a
 - quad :: Mat x1 y1 a -> Mat x2 y1 a -> Mat x1 y2 a -> Mat x2 y2 a -> Mat (Bin x1 x2) (Bin y1 y2) a
 - one :: AbelianGroupZ a => a -> Mat Leaf Leaf a
 - (.+.) :: AbelianGroupZ a => Mat x y a -> Mat x y a -> Mat x y a
 - mult :: RingP a => Bool -> Mat x y a -> Mat z x a -> Mat z y (Pair a)
 - trav :: AbelianGroupZ a => Mat y x (Pair a) -> Pair (Mat y x a)
 - q0 :: Mat (Bin x x') (Bin y y') a
 - closeDisjointP :: RingP a => Bool -> Mat x x a -> Mat y x (Pair a) -> Mat y y a -> Pair (Mat y x a)
 - showR :: Mat x y a -> String
 - bin' :: Shape' s -> Shape' s' -> Shape' (Bin s s')
 - mkShape :: Int -> SomeShape
 - mkSing :: AbelianGroupZ a => Shape' x -> Shape' y -> a -> Mat x y a
 - data SomeTri a where
 - type Q a = SomeTri a
 - mkUpDiag :: AbelianGroupZ a => [a] -> Shape' s -> Mat s s a
 - close :: RingP a => Bool -> Mat s s (Pair a) -> Pair (Mat s s a)
 - mkTree :: RingP a => [Pair a] -> SomeTri a
 - quad' :: Applicative f => f (Mat x1 y1 a) -> f (Mat x2 y1 a) -> f (Mat x1 y2 a) -> f (Mat x2 y2 a) -> f (Mat (Bin x1 x2) (Bin y1 y2) a)
 - mergein :: RingP a => Bool -> SomeTri a -> Pair a -> SomeTri a -> SomeTri a
 - zw :: (AbelianGroup a, AbelianGroup b) => (a -> b -> c) -> Vec y a -> Vec y b -> Vec y c
 - lk :: AbelianGroup a => Int -> Shape' x -> Vec x a -> a
 - lin' :: AbelianGroup a => Mat x y a -> Vec y (Vec x a)
 - contents :: Shape' x -> Vec x a -> [(Int, a)]
 - first :: (t -> t1) -> (t, t2) -> (t1, t2)
 - second :: (t -> t2) -> (t1, t) -> (t1, t2)
 - data Path :: Shape -> * where
 - (<||>) :: Maybe (a, Path x) -> Maybe (a, Path x') -> Maybe (a, Path (Bin x x'))
 - rightmostOnLine :: Path y -> Mat x y a -> Maybe (a, Path x)
 - isRightmost :: Path x -> Bool
 - results' :: AbelianGroup a => Mat y y a -> Path y -> [(Path y, a, Path y)]
 - results :: AbelianGroupZ a => SomeTri a -> [(Int, a, Int)]
 - leftMost :: Shape' s -> Path s
 - fromPath :: Shape' y -> Path y -> Int
 - root' :: AbelianGroup a => Mat x y a -> a
 - root :: AbelianGroup t => SomeTri t -> t
 - single :: AbelianGroupZ a => Pair a -> SomeTri a
 - square2 :: AbelianGroupZ a => Pair a -> SomeTri a
 - square3 :: RingP a => Bool -> Pair a -> Pair a -> SomeTri a
 - sz' :: Shape' s -> Int
 - (|+|) :: [[a]] -> [[a]] -> [[a]]
 - (-+-) :: [a] -> [a] -> [a]
 - lin :: AbelianGroup a => Shape' x -> Shape' y -> Mat x y a -> [[a]]
 - sparse :: AbelianGroup a => Shape' x -> Shape' y -> Mat x y a -> [(Int, Int, a)]
 - shiftX :: Shape' s -> [(Int, t, t1)] -> [(Int, t, t1)]
 - shiftY :: Shape' s -> [(t, Int, t1)] -> [(t, Int, t1)]
 - fingerprint :: AbelianGroupZ t => SomeTri t -> [[Char]]
 - scatterplot :: AbelianGroup t => SomeTri t -> [Char]
 
Documentation
data Mat :: Shape -> Shape -> * -> * where Source
Constructors
| Quad :: !(Mat x1 y1 a) -> !(Mat x2 y1 a) -> !(Mat x1 y2 a) -> !(Mat x2 y2 a) -> Mat (Bin x1 x2) (Bin y1 y2) a | |
| Zero :: Mat x y a | |
| One :: !a -> Mat Leaf Leaf a | |
| Row :: Mat x1 Leaf a -> Mat x2 Leaf a -> Mat (Bin x1 x2) Leaf a | |
| Col :: Mat Leaf y1 a -> Mat Leaf y2 a -> Mat Leaf (Bin y1 y2) a | 
Instances
| AbelianGroupZ a => AbelianGroup (Mat x y a) | 
data Vec :: Shape -> * -> * where Source
Instances
| AbelianGroup a => AbelianGroup (Vec x a) | 
quad :: Mat x1 y1 a -> Mat x2 y1 a -> Mat x1 y2 a -> Mat x2 y2 a -> Mat (Bin x1 x2) (Bin y1 y2) a Source
closeDisjointP :: RingP a => Bool -> Mat x x a -> Mat y x (Pair a) -> Mat y y a -> Pair (Mat y x a) Source
mkUpDiag :: AbelianGroupZ a => [a] -> Shape' s -> Mat s s a Source
quad' :: Applicative f => f (Mat x1 y1 a) -> f (Mat x2 y1 a) -> f (Mat x1 y2 a) -> f (Mat x2 y2 a) -> f (Mat (Bin x1 x2) (Bin y1 y2) a) Source
zw :: (AbelianGroup a, AbelianGroup b) => (a -> b -> c) -> Vec y a -> Vec y b -> Vec y c Source
A variant of zipWith on vectors
rightmostOnLine :: Path y -> Mat x y a -> Maybe (a, Path x) Source
What is, and where is the rightmost non-zero element on a given line of the matrix?
isRightmost :: Path x -> Bool Source
Is this the rightmost path?
root' :: AbelianGroup a => Mat x y a -> a Source
root :: AbelianGroup t => SomeTri t -> t Source
single :: AbelianGroupZ a => Pair a -> SomeTri a Source
square2 :: AbelianGroupZ a => Pair a -> SomeTri a Source
fingerprint :: AbelianGroupZ t => SomeTri t -> [[Char]] Source
scatterplot :: AbelianGroup t => SomeTri t -> [Char] Source