graphite-0.10.0.1: Graphs and networks library

Data.Graph.UGraph.DegreeSequence

Synopsis

# Documentation

The Degree Sequence of a simple UGraph is a list of degrees of the vertices in the graph

Use degreeSequence to construct a valid Degree Sequence

Instances
 Source # Instance detailsDefined in Data.Graph.UGraph.DegreeSequence Methods Source # Instance detailsDefined in Data.Graph.UGraph.DegreeSequence Methods Source # Instance detailsDefined in Data.Graph.UGraph.DegreeSequence MethodsshowList :: [DegreeSequence] -> ShowS #

# Construction

Construct a DegreeSequence from a list of degrees. Negative degree values get discarded

getDegreeSequence :: (Hashable v, Eq v) => UGraph v e -> Maybe DegreeSequence Source #

Get the DegreeSequence of a simple UGraph. If the graph is not simple (see isSimple) the result is Nothing

# Queries

Tell if a DegreeSequence is a Graphical Sequence

A Degree Sequence is a Graphical Sequence if a corresponding UGraph for it exists. Uses the Havel-Hakimi algorithm

Tell if a DegreeSequence holds the Handshaking lemma, that is, if the number of vertices with odd degree is even