mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-15 01:25:05 +03:00
Merge pull request #1991 from markfarrell/graph-and-polyhedra
Data.Graph & Data.Polyhedra
This commit is contained in:
commit
84fa0bbcaf
8
libs/contrib/Data/Graph.idr
Normal file
8
libs/contrib/Data/Graph.idr
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
module Data.Graph
|
||||||
|
|
||||||
|
import Data.Vect
|
||||||
|
|
||||||
|
data Edge e = MkEdge e e
|
||||||
|
|
||||||
|
data Graph : Nat −> Nat −> Type −> Type −> Type where
|
||||||
|
MkGraph : Vect m v −> Vect n (Edge k) −> Graph m n v k
|
9
libs/contrib/Data/Polyhedra.idr
Normal file
9
libs/contrib/Data/Polyhedra.idr
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module Data.Polyhedra
|
||||||
|
|
||||||
|
import Data.Vect
|
||||||
|
import Data.Graph
|
||||||
|
|
||||||
|
data Face f = MkFace (Vect n f)
|
||||||
|
|
||||||
|
data Polyhedron : Nat -> Nat -> Nat -> Type -> Type where
|
||||||
|
MkPolyhedron : Vect k v -> Vect m (Edge v) -> Vect n (Face v) -> Polyhedron k m n v
|
Loading…
Reference in New Issue
Block a user