The PreorderRelation data type represents a
binary relation that is both reflexive and transitive. Preorders satisfy all
laws of the Preorder type class and, in particular, the self-loop axiom:
vertex x == vertex x * vertex xand the closure axiom:
y /= empty ==> x * y + x * z + y * z == x * y + y * zFor example, the following holds:
path xs == (clique xs :: PreorderRelation Int)The Show instance produces reflexively and transitively closed expressions:
show (1 :: PreorderRelation Int) == "edge 1 1"
show (1 * 2 :: PreorderRelation Int) == "edges [(1,1),(1,2),(2,2)]"
show (1 * 2 + 2 * 3 :: PreorderRelation Int) == "edges [(1,1),(1,2),(1,3),(2,2),(2,3),(3,3)]"Instances11Eq, Num, Ord, Show, IsString, NFData, …
Ord a => Eq (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.Preorder(Ord a, Num a) => Num (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.PreorderOrd a => Ord (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.Preorder(Ord a, Show a) => Show (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.PreorderIsString a => IsString (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.PreorderNFData a => NFData (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.PreorderOrd a => Graph (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.PreorderOrd a => Preorder (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.PreorderOrd a => Reflexive (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.PreorderOrd a => Transitive (PreorderRelation a)Defined in algebraic-graphs-0.8 · Algebra.Graph.Relation.Preordertype Vertex (PreorderRelation a) = aDefined in algebraic-graphs-0.8 · Algebra.Graph.Relation.Preorder