| Copyright | (c) Immanuel Albrecht 2020-202x |
|---|---|
| License | BSD-3 |
| Maintainer | mail@immanuel-albrecht.de |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.Matroid.Typeclass.Defaults
Description
This module provides default implementations for the members of the Matroid typeclass.
Synopsis
- rk :: (Set a -> Set a) -> Set a -> Int
- indep :: (Set a -> Int) -> Set a -> Bool
- basis :: Ord a => (Set a -> Bool) -> Set a -> Set a
- cl :: Ord a => (Set a -> Int) -> Set a -> Set a -> Set a
- loops :: (Set a -> Set a) -> Set a
- coRk :: Ord a => (Set a -> Int) -> Set a -> Set a -> Int
- coloops :: Ord a => (Set a -> Int) -> Set a -> Set a
Documentation
returns the rank of the set, wrt. to the given basis filter
tests whether a given set is independent
Arguments
| :: Ord a | |
| => (Set a -> Bool) | the independence test of the matroid |
| -> Set a | set of matroid elements |
| -> Set a |
obtains an independent subset with maximal cardinality
Arguments
| :: Ord a | |
| => (Set a -> Int) | the rank function of the matroid |
| -> Set a | the groundset of the matroid |
| -> Set a | set of matroid elements |
| -> Set a |
computes the closure of a given set
returns the loops in the matroid