Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
Data.PlanarGraph.Dart
Description
Data type for representing Darts (edges) in a planar graph.
Synopsis
Documentation
>>>
:{
let dart i s = Dart (Arc i) (read s) :}
An Arc is a directed edge in a planar graph. The type s is used to tie this arc to a particular graph.
Instances
Bounded (Arc s) Source # | |
Enum (Arc s) Source # | |
Defined in Data.PlanarGraph.Dart | |
Eq (Arc s) Source # | |
Ord (Arc s) Source # | |
Show (Arc s) Source # | |
Generic (Arc s) Source # | |
Arbitrary (Arc s) Source # | |
NFData (Arc s) Source # | |
Defined in Data.PlanarGraph.Dart | |
type Rep (Arc s) Source # | |
Defined in Data.PlanarGraph.Dart |
Darts have a direction which is either Positive or Negative (shown as +1 or -1, respectively).
Instances
Bounded Direction Source # | |
Enum Direction Source # | |
Defined in Data.PlanarGraph.Dart Methods succ :: Direction -> Direction # pred :: Direction -> Direction # fromEnum :: Direction -> Int # enumFrom :: Direction -> [Direction] # enumFromThen :: Direction -> Direction -> [Direction] # enumFromTo :: Direction -> Direction -> [Direction] # enumFromThenTo :: Direction -> Direction -> Direction -> [Direction] # | |
Eq Direction Source # | |
Ord Direction Source # | |
Read Direction Source # | |
Show Direction Source # | |
Generic Direction Source # | |
Arbitrary Direction Source # | |
NFData Direction Source # | |
Defined in Data.PlanarGraph.Dart | |
type Rep Direction Source # | |
Defined in Data.PlanarGraph.Dart |
A dart represents a bi-directed edge. I.e. a dart has a direction, however the dart of the oposite direction is always present in the planar graph as well.
Constructors
Dart | |
Fields
|
Instances
twin :: Dart s -> Dart s Source #
Get the twin of this dart (edge)
>>>
twin (dart 0 "+1")
Dart (Arc 0) -1>>>
twin (dart 0 "-1")
Dart (Arc 0) +1
isPositive :: Dart s -> Bool Source #
test if a dart is Positive