Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Shape
- data Shape' (a :: Shape) where
- data SomeShape where
- data Mat (a :: Shape) (b :: Shape) c where
- Quad :: forall (x1 :: Shape) (y1 :: Shape) c (x2 :: Shape) (y2 :: Shape). !(Mat x1 y1 c) -> !(Mat x2 y1 c) -> !(Mat x1 y2 c) -> !(Mat x2 y2 c) -> Mat ('Bin x1 x2) ('Bin y1 y2) c
- Zero :: forall (a :: Shape) (b :: Shape) c. Mat a b c
- One :: forall c. !c -> Mat 'Leaf 'Leaf c
- Row :: forall (x1 :: Shape) c (x2 :: Shape). Mat x1 'Leaf c -> Mat x2 'Leaf c -> Mat ('Bin x1 x2) 'Leaf c
- Col :: forall (y1 :: Shape) c (y2 :: Shape). Mat 'Leaf y1 c -> Mat 'Leaf y2 c -> Mat 'Leaf ('Bin y1 y2) c
- data Vec (a :: Shape) b where
- row :: forall {x1 :: Shape} {a} {x2 :: Shape}. Mat x1 'Leaf a -> Mat x2 'Leaf a -> Mat ('Bin x1 x2) 'Leaf a
- col :: forall (y1 :: Shape) a (y2 :: Shape). Mat 'Leaf y1 a -> Mat 'Leaf y2 a -> Mat 'Leaf ('Bin y1 y2) a
- quad :: forall {x1 :: Shape} {y1 :: Shape} {a} {x2 :: Shape} {y2 :: Shape}. 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
- (.+.) :: forall a (x :: Shape) (y :: Shape). AbelianGroupZ a => Mat x y a -> Mat x y a -> Mat x y a
- mult :: forall a (x :: Shape) (y :: Shape) (z :: Shape). RingP a => Bool -> Mat x y a -> Mat z x a -> Mat z y (Pair a)
- trav :: forall a (y :: Shape) (x :: Shape). AbelianGroupZ a => Mat y x (Pair a) -> Pair (Mat y x a)
- q0 :: forall (x :: Shape) (x' :: Shape) (y :: Shape) (y' :: Shape) a. Mat ('Bin x x') ('Bin y y') a
- closeDisjointP :: forall a (x :: Shape) (y :: Shape). RingP a => Bool -> Mat x x a -> Mat y x (Pair a) -> Mat y y a -> Pair (Mat y x a)
- showR :: forall (x :: Shape) (y :: Shape) a. Mat x y a -> String
- bin' :: forall (s :: Shape) (s' :: Shape). Shape' s -> Shape' s' -> Shape' ('Bin s s')
- mkShape :: Int -> SomeShape
- mkSing :: forall a (x :: Shape) (y :: Shape). AbelianGroupZ a => Shape' x -> Shape' y -> a -> Mat x y a
- data SomeTri a where
- type Q a = SomeTri a
- mkUpDiag :: forall a (s :: Shape). AbelianGroupZ a => [a] -> Shape' s -> Mat s s a
- close :: forall a (s :: Shape). RingP a => Bool -> Mat s s (Pair a) -> Pair (Mat s s a)
- mkTree :: RingP a => [Pair a] -> SomeTri a
- quad' :: forall {f} {x1 :: Shape} {y1 :: Shape} {a} {x2 :: Shape} {y2 :: Shape}. 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 :: forall a b c (y :: Shape). (AbelianGroup a, AbelianGroup b) => (a -> b -> c) -> Vec y a -> Vec y b -> Vec y c
- lk :: forall a (x :: Shape). AbelianGroup a => Int -> Shape' x -> Vec x a -> a
- lin' :: forall a (x :: Shape) (y :: Shape). AbelianGroup a => Mat x y a -> Vec y (Vec x a)
- contents :: forall (x :: Shape) a. Shape' x -> Vec x a -> [(Int, a)]
- first :: (t -> a) -> (t, b) -> (a, b)
- second :: (t -> b) -> (a, t) -> (a, b)
- data Path (a :: Shape) where
- (<||>) :: forall a (x :: Shape) (x' :: Shape). Maybe (a, Path x) -> Maybe (a, Path x') -> Maybe (a, Path ('Bin x x'))
- rightmostOnLine :: forall (y :: Shape) (x :: Shape) a. Path y -> Mat x y a -> Maybe (a, Path x)
- isRightmost :: forall (x :: Shape). Path x -> Bool
- results' :: forall a (y :: Shape). AbelianGroup a => Mat y y a -> Path y -> [(Path y, a, Path y)]
- results :: AbelianGroupZ a => SomeTri a -> [(Int, a, Int)]
- leftMost :: forall (s :: Shape). Shape' s -> Path s
- fromPath :: forall (y :: Shape). Shape' y -> Path y -> Int
- root' :: forall a (x :: Shape) (y :: Shape). AbelianGroup a => Mat x y a -> a
- root :: AbelianGroup p => SomeTri p -> p
- 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' :: forall (s :: Shape). Shape' s -> Int
- (|+|) :: [[a]] -> [[a]] -> [[a]]
- (-+-) :: [a] -> [a] -> [a]
- lin :: forall a (x :: Shape) (y :: Shape). AbelianGroup a => Shape' x -> Shape' y -> Mat x y a -> [[a]]
- sparse :: forall a (x :: Shape) (y :: Shape). AbelianGroup a => Shape' x -> Shape' y -> Mat x y a -> [(Int, Int, a)]
- shiftX :: forall {s :: Shape} {b} {c}. Shape' s -> [(Int, b, c)] -> [(Int, b, c)]
- shiftY :: forall {s :: Shape} {a} {c}. Shape' s -> [(a, Int, c)] -> [(a, Int, c)]
- fingerprint :: AbelianGroupZ a => SomeTri a -> [[Char]]
- scatterplot :: AbelianGroup a => SomeTri a -> [Char]
Documentation
data Mat (a :: Shape) (b :: Shape) c where Source #
Quad :: forall (x1 :: Shape) (y1 :: Shape) c (x2 :: Shape) (y2 :: Shape). !(Mat x1 y1 c) -> !(Mat x2 y1 c) -> !(Mat x1 y2 c) -> !(Mat x2 y2 c) -> Mat ('Bin x1 x2) ('Bin y1 y2) c | |
Zero :: forall (a :: Shape) (b :: Shape) c. Mat a b c | |
One :: forall c. !c -> Mat 'Leaf 'Leaf c | |
Row :: forall (x1 :: Shape) c (x2 :: Shape). Mat x1 'Leaf c -> Mat x2 'Leaf c -> Mat ('Bin x1 x2) 'Leaf c | |
Col :: forall (y1 :: Shape) c (y2 :: Shape). Mat 'Leaf y1 c -> Mat 'Leaf y2 c -> Mat 'Leaf ('Bin y1 y2) c |
row :: forall {x1 :: Shape} {a} {x2 :: Shape}. Mat x1 'Leaf a -> Mat x2 'Leaf a -> Mat ('Bin x1 x2) 'Leaf a Source #
col :: forall (y1 :: Shape) a (y2 :: Shape). Mat 'Leaf y1 a -> Mat 'Leaf y2 a -> Mat 'Leaf ('Bin y1 y2) a Source #
quad :: forall {x1 :: Shape} {y1 :: Shape} {a} {x2 :: Shape} {y2 :: Shape}. 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 #
(.+.) :: forall a (x :: Shape) (y :: Shape). AbelianGroupZ a => Mat x y a -> Mat x y a -> Mat x y a Source #
mult :: forall a (x :: Shape) (y :: Shape) (z :: Shape). RingP a => Bool -> Mat x y a -> Mat z x a -> Mat z y (Pair a) Source #
trav :: forall a (y :: Shape) (x :: Shape). AbelianGroupZ a => Mat y x (Pair a) -> Pair (Mat y x a) Source #
q0 :: forall (x :: Shape) (x' :: Shape) (y :: Shape) (y' :: Shape) a. Mat ('Bin x x') ('Bin y y') a Source #
closeDisjointP :: forall a (x :: Shape) (y :: Shape). RingP a => Bool -> Mat x x a -> Mat y x (Pair a) -> Mat y y a -> Pair (Mat y x a) Source #
mkSing :: forall a (x :: Shape) (y :: Shape). AbelianGroupZ a => Shape' x -> Shape' y -> a -> Mat x y a Source #
quad' :: forall {f} {x1 :: Shape} {y1 :: Shape} {a} {x2 :: Shape} {y2 :: Shape}. 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 :: forall a b c (y :: Shape). (AbelianGroup a, AbelianGroup b) => (a -> b -> c) -> Vec y a -> Vec y b -> Vec y c Source #
A variant of zipWith on vectors
lk :: forall a (x :: Shape). AbelianGroup a => Int -> Shape' x -> Vec x a -> a Source #
Lookup in a vector
lin' :: forall a (x :: Shape) (y :: Shape). AbelianGroup a => Mat x y a -> Vec y (Vec x a) Source #
Linearize a matrix
(<||>) :: forall a (x :: Shape) (x' :: Shape). Maybe (a, Path x) -> Maybe (a, Path x') -> Maybe (a, Path ('Bin x x')) Source #
rightmostOnLine :: forall (y :: Shape) (x :: Shape) a. 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?
results' :: forall a (y :: Shape). AbelianGroup a => Mat y y a -> Path y -> [(Path y, a, Path y)] Source #
root :: AbelianGroup p => SomeTri p -> p Source #
lin :: forall a (x :: Shape) (y :: Shape). AbelianGroup a => Shape' x -> Shape' y -> Mat x y a -> [[a]] Source #
sparse :: forall a (x :: Shape) (y :: Shape). AbelianGroup a => Shape' x -> Shape' y -> Mat x y a -> [(Int, Int, a)] Source #
fingerprint :: AbelianGroupZ a => SomeTri a -> [[Char]] Source #
scatterplot :: AbelianGroup a => SomeTri a -> [Char] Source #