Copyright | (c) Immanuel Albrecht 2020-202x |
---|---|
License | BSD-3 |
Maintainer | mail@immanuel-albrecht.de |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides internal helpers for the matroid package, for instance data types that help converting different matroid representations to Matroid . . -types.
Although it is exported, using anything from this module that is not re-exported by another module may (and eventually will) break client side code. The main reason for exporting this is so anyone can inspect internals using haddock; it's a little bit like an open door policy for code.
Synopsis
- fromRk :: Show a => Set a -> (Set a -> Int) -> RkMatroid a
- namedFromRk :: String -> Set a -> (Set a -> Int) -> RkMatroid a
- fromIndep :: Show a => Set a -> (Set a -> Bool) -> IndepMatroid a
- namedFromIndep :: String -> Set a -> (Set a -> Bool) -> IndepMatroid a
- fromBasisFilter :: Show a => Set a -> (Set a -> Set a) -> BasisFilterMatroid a
- namedFromBasisFilter :: String -> Set a -> (Set a -> Set a) -> BasisFilterMatroid a
- data RkMatroid a
- data IndepMatroid a
- data BasisFilterMatroid a
Documentation
matroid constructor given groundset and rank function
named matroid constructor given groundset and rank function
:: Show a | |
=> Set a | ground set |
-> (Set a -> Bool) | independence test |
-> IndepMatroid a |
matroid constructor given groundset and test for independence
:: String | name |
-> Set a | ground set |
-> (Set a -> Bool) | independence test |
-> IndepMatroid a |
named matroid constructor given groundset and test for independence
:: Show a | |
=> Set a | ground set |
-> (Set a -> Set a) | returns maximal independent subset |
-> BasisFilterMatroid a |
matroid constructor given groundset and set-basis filter
:: String | name |
-> Set a | ground set |
-> (Set a -> Set a) | returns maximal independent subset |
-> BasisFilterMatroid a |
named matroid constructor given groundset and set-basis filter
we use this data type to combine a given rank function with the default implementations from the Matroid typeclass
Instances
(Ord a, Show a) => Matroid RkMatroid a Source # | |
Defined in Data.Matroid.Internal groundset :: RkMatroid a -> Set a Source # showName :: RkMatroid a -> String Source # rk :: RkMatroid a -> Set a -> Int Source # indep :: RkMatroid a -> Set a -> Bool Source # basis :: RkMatroid a -> Set a -> Set a Source # cl :: RkMatroid a -> Set a -> Set a Source # abstract :: RkMatroid a -> AMatroid a Source # dual :: RkMatroid a -> AMatroid a Source # restriction :: RkMatroid a -> Set a -> AMatroid a Source # contraction :: RkMatroid a -> Set a -> AMatroid a Source # loops :: RkMatroid a -> Set a Source # | |
Show a => Show (RkMatroid a) Source # | |
data IndepMatroid a Source #
we use this data type to combine a given independence test with the default implementations from the Matroid typeclass
Instances
(Ord a, Show a) => Matroid IndepMatroid a Source # | |
Defined in Data.Matroid.Internal groundset :: IndepMatroid a -> Set a Source # showName :: IndepMatroid a -> String Source # rk :: IndepMatroid a -> Set a -> Int Source # indep :: IndepMatroid a -> Set a -> Bool Source # basis :: IndepMatroid a -> Set a -> Set a Source # cl :: IndepMatroid a -> Set a -> Set a Source # abstract :: IndepMatroid a -> AMatroid a Source # dual :: IndepMatroid a -> AMatroid a Source # restriction :: IndepMatroid a -> Set a -> AMatroid a Source # contraction :: IndepMatroid a -> Set a -> AMatroid a Source # loops :: IndepMatroid a -> Set a Source # coRk :: IndepMatroid a -> Set a -> Int Source # coloops :: IndepMatroid a -> Set a Source # | |
Show a => Show (IndepMatroid a) Source # | |
Defined in Data.Matroid.Internal showsPrec :: Int -> IndepMatroid a -> ShowS # show :: IndepMatroid a -> String # showList :: [IndepMatroid a] -> ShowS # |
data BasisFilterMatroid a Source #
we use this data type to combine a given a basis filter with the default implementations from the Matroid typeclass