hgeometry-0.9.0.0: Geometric Algorithms, Data structures, and Data types.

Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageHaskell2010

Data.PlaneGraph.AdjRep

Description

Data types that help encodedecode a planegraph as a JSONYAML file.

Synopsis

Documentation

data Gr v f #

Constructors

Gr 

Fields

Instances
Bifunctor Gr 
Instance details

Defined in Data.PlanarGraph.AdjRep

Methods

bimap :: (a -> b) -> (c -> d) -> Gr a c -> Gr b d #

first :: (a -> b) -> Gr a c -> Gr b c #

second :: (b -> c) -> Gr a b -> Gr a c #

Generic (Gr v f) 
Instance details

Defined in Data.PlanarGraph.AdjRep

Associated Types

type Rep (Gr v f) :: Type -> Type #

Methods

from :: Gr v f -> Rep (Gr v f) x #

to :: Rep (Gr v f) x -> Gr v f #

(FromJSON v, FromJSON f) => FromJSON (Gr v f) 
Instance details

Defined in Data.PlanarGraph.AdjRep

Methods

parseJSON :: Value -> Parser (Gr v f)

parseJSONList :: Value -> Parser [Gr v f]

(ToJSON v, ToJSON f) => ToJSON (Gr v f) 
Instance details

Defined in Data.PlanarGraph.AdjRep

Methods

toJSON :: Gr v f -> Value

toEncoding :: Gr v f -> Encoding

toJSONList :: [Gr v f] -> Value

toEncodingList :: [Gr v f] -> Encoding

type Rep (Gr v f) 
Instance details

Defined in Data.PlanarGraph.AdjRep

type Rep (Gr v f) = D1 (MetaData "Gr" "Data.PlanarGraph.AdjRep" "hgeometry-combinatorial-0.9.0.0-inplace" False) (C1 (MetaCons "Gr" PrefixI True) (S1 (MetaSel (Just "ajacencies") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [v]) :*: S1 (MetaSel (Just "faces") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [f])))

data Vtx v e r Source #

A vertex, represented by an id, location, its adjacencies, and its data.

Constructors

Vtx 

Fields

  • id :: Int
     
  • loc :: Point 2 r
     
  • adj :: [(Int, e)]

    adjacent vertices + data on the edge. Adjacencies are given in arbitrary order

  • vData :: v
     
Instances
Functor (Vtx v e) Source # 
Instance details

Defined in Data.PlaneGraph.AdjRep

Methods

fmap :: (a -> b) -> Vtx v e a -> Vtx v e b #

(<$) :: a -> Vtx v e b -> Vtx v e a #

Generic (Vtx v e r) Source # 
Instance details

Defined in Data.PlaneGraph.AdjRep

Associated Types

type Rep (Vtx v e r) :: Type -> Type #

Methods

from :: Vtx v e r -> Rep (Vtx v e r) x #

to :: Rep (Vtx v e r) x -> Vtx v e r #

(FromJSON r, FromJSON v, FromJSON e) => FromJSON (Vtx v e r) Source # 
Instance details

Defined in Data.PlaneGraph.AdjRep

Methods

parseJSON :: Value -> Parser (Vtx v e r)

parseJSONList :: Value -> Parser [Vtx v e r]

(ToJSON r, ToJSON v, ToJSON e) => ToJSON (Vtx v e r) Source # 
Instance details

Defined in Data.PlaneGraph.AdjRep

Methods

toJSON :: Vtx v e r -> Value

toEncoding :: Vtx v e r -> Encoding

toJSONList :: [Vtx v e r] -> Value

toEncodingList :: [Vtx v e r] -> Encoding

type Rep (Vtx v e r) Source # 
Instance details

Defined in Data.PlaneGraph.AdjRep

data Face f #

Constructors

Face 

Fields

Instances
Functor Face 
Instance details

Defined in Data.PlanarGraph.AdjRep

Methods

fmap :: (a -> b) -> Face a -> Face b #

(<$) :: a -> Face b -> Face a #

Generic (Face f) 
Instance details

Defined in Data.PlanarGraph.AdjRep

Associated Types

type Rep (Face f) :: Type -> Type #

Methods

from :: Face f -> Rep (Face f) x #

to :: Rep (Face f) x -> Face f #

FromJSON f => FromJSON (Face f) 
Instance details

Defined in Data.PlanarGraph.AdjRep

Methods

parseJSON :: Value -> Parser (Face f)

parseJSONList :: Value -> Parser [Face f]

ToJSON f => ToJSON (Face f) 
Instance details

Defined in Data.PlanarGraph.AdjRep

Methods

toJSON :: Face f -> Value

toEncoding :: Face f -> Encoding

toJSONList :: [Face f] -> Value

toEncodingList :: [Face f] -> Encoding

type Rep (Face f) 
Instance details

Defined in Data.PlanarGraph.AdjRep

type Rep (Face f) = D1 (MetaData "Face" "Data.PlanarGraph.AdjRep" "hgeometry-combinatorial-0.9.0.0-inplace" False) (C1 (MetaCons "Face" PrefixI True) (S1 (MetaSel (Just "incidentEdge") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Int, Int)) :*: S1 (MetaSel (Just "fData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 f)))