matroid-0.0.0.1.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.Graphic

Description

This module provides implementations of graphic matroids.

Synopsis

Documentation

data GraphicMatroid v a Source #

data type representing the cycle matroid (aka. polygon matroid) of a (multi-)graph

Instances

Instances details
(Ord a, Ord v, Show a) => Matroid (GraphicMatroid v) a Source # 
Instance details

Defined in Data.Matroid.Graphic

Show a => Show (GraphicMatroid v a) Source # 
Instance details

Defined in Data.Matroid.Graphic

fromGraph Source #

Arguments

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

set of edges of the (multi-)graph

-> (a -> (v, v))

map that maps the edge e to the set of its incident vertices {u,v}; the order is ignored, and {v} is represented by (v,v)

-> GraphicMatroid v a 

constructs a GraphicMatroid from a set of (abstract) edges and the incident-vertex map

namedFromGraph Source #

Arguments

:: Ord a 
=> String

name of the matroid

-> Set a

set of edges of the (multi-)graph

-> (a -> (v, v))

map that maps the edge e to the set of its incident vertices {u,v}; the order is ignored, and {v} is represented by (v,v)

-> GraphicMatroid v a 

constructs a named GraphicMatroid from a set of (abstract) edges and the incident-vertex map

fromGraph' Source #

Arguments

:: Ord a 
=> Set a

set of edges of the (multi-)graph

-> (a -> (v, v))

map that maps the edge e to the set of its incident vertices {u,v}; the order is ignored, and {v} is represented by (v,v)

-> GraphicMatroid v a 

constructs an unnamed GraphicMatroid from a set of (abstract) edges and the incident-vertex map

mK Source #

Arguments

:: Int

n = number of vertices in K_n

-> GraphicMatroid Int (Int, Int) 

constructs the graphic matroid M(K_n) where K_n is the complete graph on n vertices