matroid-0.0.0.1: matroid (combinatorial pre-geometries) library
Copyright(c) Immanuel Albrecht 2020-202x
LicenseBSD-3
Maintainermail@immanuel-albrecht.de
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Matroid.Ops

Description

This module provides implementations of common operations on matroids and an abstract matroid data type.

Synopsis

Documentation

data AMatroid a Source #

abstract matroid data type with elements of a given type

Its purpose is to hide the underlying type from the type system. The records resemble the typeclass Matroid, where everything except for the groundset has been placed inside the Maybe-Monad. A value of Nothing indicates that the default implementation of the typeclass should be used.

Constructors

WMatroid 

Fields

Instances

Instances details
(Ord a, Show a) => Matroid AMatroid a Source #

This instance contains the default implementations of the members of the Matroid typeclass.

Instance details

Defined in Data.Matroid.Typeclass

Show a => Show (AMatroid a) Source # 
Instance details

Defined in Data.Matroid.Ops

Methods

showsPrec :: Int -> AMatroid a -> ShowS #

show :: AMatroid a -> String #

showList :: [AMatroid a] -> ShowS #

wrappedMatroid :: AMatroid a Source #

defaults for WMatroid

a_restriction Source #

Arguments

:: (Show a, Ord a) 
=> AMatroid a

input matroid

-> Set a

restriction of ground set

-> AMatroid a 

returns the restriction of a given matroid

Note that this routine implements the correct routines provided that the prerequisite members in the input matroid are defined. Routines which have missing prerequisite members in the input matroid will be left to Nothing. Data.Matroid.Typeclass.wrapUp fills all AMatroid record members.

a_namedRestriction Source #

Arguments

:: Ord a 
=> String

name

-> AMatroid a

input matroid

-> Set a

restriction of ground set

-> AMatroid a 

returns the restriction of a given matroid, named

Note that this routine implements the correct routines provided that the prerequisite members in the input matroid are defined. Routines which have missing prerequisite members in the input matroid will be left to Nothing. Data.Matroid.Typeclass.wrapUp fills all AMatroid record members.

a_contraction Source #

Arguments

:: (Show a, Ord a) 
=> AMatroid a

input matroid

-> Set a

contract the ground set onto this set

-> AMatroid a 

returns the contraction of a given matroid

Note that this routine implements the correct routines provided that the prerequisite members in the input matroid are defined. Routines which have missing prerequisite members in the input matroid will be left to Nothing. Data.Matroid.Typeclass.wrapUp fills all AMatroid record members.

a_namedContraction Source #

Arguments

:: Ord a 
=> String

name

-> AMatroid a

input matroid

-> Set a

contract the ground set onto this set

-> AMatroid a 

returns the contraction of a given matroid, named

Note that this routine implements the correct routines provided that the prerequisite members in the input matroid are defined. Routines which have missing prerequisite members in the input matroid will be left to Nothing. Data.Matroid.Typeclass.wrapUp fills all AMatroid record members.

a_dual Source #

Arguments

:: (Show a, Ord a) 
=> AMatroid a

input matroid

-> AMatroid a 

returns the contraction of a given matroid

Note that this routine implements the correct routines provided that the prerequisite members in the input matroid are defined. Routines which have missing prerequisite members in the input matroid will be left to Nothing. Data.Matroid.Typeclass.wrapUp fills all AMatroid record members.

a_namedDual Source #

Arguments

:: Ord a 
=> String

name

-> AMatroid a

input matroid

-> AMatroid a 

returns the contraction of a given matroid, named

Note that this routine implements the correct routines provided that the prerequisite members in the input matroid are defined. Routines which have missing prerequisite members in the input matroid will be left to Nothing. Data.Matroid.Typeclass.wrapUp fills all AMatroid record members.