Safe Haskell | None |
---|---|
Language | Haskell98 |
- type Basis b = Ord b
- newtype Free b r = F {}
- liftF :: (Map b r -> Map b' r') -> Free b r -> Free b' r'
- (.#) :: r -> b -> Free b r
- mapBasis :: (Basis b, Basis c) => (b -> c) -> Free b r -> Free c r
- data Lin b c r = Lin {}
- columns :: Lin i j a -> Map i (Map j a)
- onMatrix :: (Free b (Free c r) -> Free b (Free c r)) -> Lin b c r -> Lin b c r
- plus :: (Basis b, AbEq r) => [(b, r)] -> Free b r
- coeff :: (Basis b, AbelianGroup r) => Free b r -> b -> r
- monomials :: Free b r -> [(b, r)]
- lin :: (Basis b, Basis c, AbelianGroup r, Eq r) => [b] -> [c] -> Free b (Free c r) -> Lin b c r
- transpose :: (Basis b, Basis c, AbEq r) => Free c (Free b r) -> Free b (Free c r)
- dual :: (Basis a, Basis b, AbEq r) => Lin a b r -> Lin b a r
- o :: (Basis a, Basis b, Basis c, RingEq r) => Lin b c r -> Lin a b r -> Lin a c r
- apply :: (Basis a, Basis b, RingEq r) => Free a (Free b r) -> Free a r -> Free b r
- tensor :: (Basis b, Basis c, Ring r, Eq r) => Free b r -> Free c r -> Free (b, c) r
- isNullMatrix :: AbEq r => Lin a b r -> Bool
- isNullVector :: AbEq r => Free b r -> Bool
- join_free :: (Basis b, Basis c, AbelianGroup r) => Free b (Free c r) -> Free (b, c) r
- unions :: (Basis a, Foldable f) => f (Set a) -> Set a
- mapToPairs :: (Basis k, Basis a) => Map k (Set a) -> Set (k, a)
- join_codomains :: (Basis b, Basis b', Basis c, Basis c', AbEq r) => Lin b c (Lin b' c' r) -> Set (c, c')
- join_domains :: (Basis b, Basis b', Basis c, Basis c', AbEq r) => Lin b c (Lin b' c' r) -> Set (b, b')
- join_lin :: (Basis a, Basis b, Basis c, Basis d, AbEq r) => Lin a c (Lin b d r) -> Lin (a, b) (c, d) r
- seqMatrix :: Free c (Free b r) -> x -> x
- ($!!!) :: (Free c (Free b r) -> x) -> Free c (Free b r) -> x
- gauss :: forall b c r. (Basis b, Basis c, Field r, Eq r, NFData b, NFData c, NFData r) => Lin b c r -> Lin b c r
- rank :: (Basis b, Basis c, Field r, Eq r, NFData b, NFData c, NFData r) => Lin b c r -> Int
- adjust :: Basis b => (r -> r) -> b -> Free b r -> Free b r
- exchange :: Basis b => b -> b -> Free b r -> Free b r
- findIndices :: (r -> Bool) -> Free b r -> [b]
- (#) :: (Basis b, Basis c, AbelianGroup r) => Free c (Free b r) -> (c, b) -> r
Documentation
Free vector space with basis b
and coefficient ring r
.
Functor (Free b) | |
Foldable (Free b) | |
(Eq b, Eq r) => Eq (Free b r) | |
(Ord b, Read b, Read r) => Read (Free b r) | |
(Show b, Show r) => Show (Free b r) | |
Basis b => Default (Free b r) | |
(NFData b, NFData r) => NFData (Free b r) | |
(AbelianGroup r, Basis b) => AbelianGroup (Free b r) | Point-wise addition |
(Basis b, Monoid b, Ring r, Eq r) => Ring (Free b r) | A sort of Kronecker (tensor) product |
Encoding of a linear map from `Free b r' to `Free c r'. The choice of
encoding is limited to such linear maps f
where `f(x)' vanishes for all
but finitely many basis elements x
in b
.
Speaking matrix-wise, the intended interpretation is column-major format; use
dual
to convert from row-major format.
Functor (Lin b c) | |
Foldable (Lin b c) | |
(Eq b, Eq c, Eq r) => Eq (Lin b c r) | |
(Ord b, Ord c, Read b, Read c, Read r) => Read (Lin b c r) | |
(Show b, Show c, Show r) => Show (Lin b c r) | |
(NFData b, NFData c, NFData r) => NFData (Lin b c r) | |
(Basis b, Basis c, AbelianGroup r) => AbelianGroup (Lin b c r) | |
(Ring r, Eq r, Monoid b, Basis b) => Ring (Lin b b r) | (Partial) ring instance for certain endomorphisms, implementing tensor product. BEWARE: This is the tensor product; it is *not* composition of morphisms. |
coeff :: (Basis b, AbelianGroup r) => Free b r -> b -> r Source
lin :: (Basis b, Basis c, AbelianGroup r, Eq r) => [b] -> [c] -> Free b (Free c r) -> Lin b c r Source
o :: (Basis a, Basis b, Basis c, RingEq r) => Lin b c r -> Lin a b r -> Lin a c r Source
Composition of linear maps.
apply :: (Basis a, Basis b, RingEq r) => Free a (Free b r) -> Free a r -> Free b r Source
Matrix-vector-multiplication.
tensor :: (Basis b, Basis c, Ring r, Eq r) => Free b r -> Free c r -> Free (b, c) r Source
Outer tensor product. Works also for linear maps, but for endomorphisms,
*
is preferred.
isNullMatrix :: AbEq r => Lin a b r -> Bool Source
Checks whether the linear map maps everything to def
.
isNullVector :: AbEq r => Free b r -> Bool Source
join_codomains :: (Basis b, Basis b', Basis c, Basis c', AbEq r) => Lin b c (Lin b' c' r) -> Set (c, c') Source
join_domains :: (Basis b, Basis b', Basis c, Basis c', AbEq r) => Lin b c (Lin b' c' r) -> Set (b, b') Source
join_lin :: (Basis a, Basis b, Basis c, Basis d, AbEq r) => Lin a c (Lin b d r) -> Lin (a, b) (c, d) r Source
seqMatrix :: Free c (Free b r) -> x -> x Source
Reduce the entries of a matrix to weak head normal form.
($!!!) :: (Free c (Free b r) -> x) -> Free c (Free b r) -> x infixr 0 Source
Apply seqMatrix
to the argument before applying the function to it.
gauss :: forall b c r. (Basis b, Basis c, Field r, Eq r, NFData b, NFData c, NFData r) => Lin b c r -> Lin b c r Source
Applies elementary column transformations until column echelon form is achieved.
findIndices :: (r -> Bool) -> Free b r -> [b] Source