| Copyright | (C) Frank Staals |
|---|---|
| License | see the LICENSE file |
| Maintainer | Frank Staals |
| Safe Haskell | None |
| Language | GHC2024 |
HGeometry.PolyLine
Description
A Polyline and some basic functions to interact with them.
Synopsis
- newtype PolyLineF (f :: k -> Type) (point :: k) = PolyLine (f point)
- type PolyLine = PolyLineF NonEmptyVector
- _PolyLineF :: forall {k1} {k2} f1 (point :: k1) f' (point' :: k2) p f2. (Profunctor p, Functor f2) => p (f1 point) (f2 (f' point')) -> p (PolyLineF f1 point) (f2 (PolyLineF f' point'))
- module HGeometry.PolyLine.Class
- class HasVertices' graph => HasVertices graph graph' where
- vertices :: IndexedTraversal1 (VertexIx graph) graph graph' (Vertex graph) (Vertex graph')
- class HasEdges' graph => HasEdges graph graph' where
- edges :: IndexedTraversal (EdgeIx graph) graph graph' (Edge graph) (Edge graph')
Documentation
newtype PolyLineF (f :: k -> Type) (point :: k) Source #
Simple polygons just store their vertices in CCCW order
Constructors
| PolyLine (f point) |
Instances
type PolyLine = PolyLineF NonEmptyVector Source #
By default we store simple poylline as non-empty vectors.
_PolyLineF :: forall {k1} {k2} f1 (point :: k1) f' (point' :: k2) p f2. (Profunctor p, Functor f2) => p (f1 point) (f2 (f' point')) -> p (PolyLineF f1 point) (f2 (PolyLineF f' point')) Source #
Access the container
module HGeometry.PolyLine.Class
class HasVertices' graph => HasVertices graph graph' where Source #
Class that expresses that we have a non-empty type changing traversal of all vertices.
Methods
vertices :: IndexedTraversal1 (VertexIx graph) graph graph' (Vertex graph) (Vertex graph') Source #
Traversal of all vertices in the graph
Instances
| HasVertices Graph Graph Source # | |
| HasVertices (Triangle point) (Triangle point') Source # | |
| HasVertices graph graph' => HasVertices (graph :+ extra) (graph' :+ extra) Source # | |
| (Traversable1 endPoint, EndPoint_ (endPoint v), IxValue (endPoint v) ~ v) => HasVertices (LineSegment endPoint v) (LineSegment endPoint v') Source # | |
Defined in HGeometry.LineSegment.Internal Methods vertices :: IndexedTraversal1 (VertexIx (LineSegment endPoint v)) (LineSegment endPoint v) (LineSegment endPoint v') (Vertex (LineSegment endPoint v)) (Vertex (LineSegment endPoint v')) Source # | |
| (TraversableWithIndex Int f, Traversable1 f, IxValue (f point) ~ point, Index (f point) ~ Int, Ixed (f point)) => HasVertices (PolyLineF f point) (PolyLineF f point') Source # | |
| HasVertices (GGraph f v e) (GGraph f v' e) Source # | |
| Ord i => HasVertices (GGraph f i v e) (GGraph f i v' e) Source # | |
| HasVertices (PlanarGraph w s v e f) (PlanarGraph w s v' e f) Source # | |
Defined in Hiraffe.PlanarGraph.Type Methods vertices :: IndexedTraversal1 (VertexIx (PlanarGraph w s v e f)) (PlanarGraph w s v e f) (PlanarGraph w s v' e f) (Vertex (PlanarGraph w s v e f)) (Vertex (PlanarGraph w s v' e f)) Source # | |
class HasEdges' graph => HasEdges graph graph' where Source #
Class for types that have a type changing traversal of the edges
Methods
edges :: IndexedTraversal (EdgeIx graph) graph graph' (Edge graph) (Edge graph') Source #
Traversal of all edges in the graph
Instances
| HasEdges Graph Graph Source # | |
| HasEdges graph graph' => HasEdges (graph :+ extra) (graph' :+ extra) Source # | |
| HasEdges (GGraph f v e) (GGraph f v e') Source # | |
| Ord i => HasEdges (GGraph f i v e) (GGraph f i v e') Source # | |
| HasEdges (PlanarGraph w s v e f) (PlanarGraph w s v e' f) Source # | |
Defined in Hiraffe.PlanarGraph.Type Methods edges :: IndexedTraversal (EdgeIx (PlanarGraph w s v e f)) (PlanarGraph w s v e f) (PlanarGraph w s v e' f) (Edge (PlanarGraph w s v e f)) (Edge (PlanarGraph w s v e' f)) Source # | |