Skip to content

Commit

Permalink
Merge pull request #1991 from markfarrell/graph-and-polyhedra
Browse files Browse the repository at this point in the history
Data.Graph & Data.Polyhedra
  • Loading branch information
david-christiansen committed Mar 22, 2015
2 parents e10c205 + 57f1543 commit 84fa0bb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libs/contrib/Data/Graph.idr
Original file line number Diff line number Diff line change
@@ -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 changes: 9 additions & 0 deletions libs/contrib/Data/Polyhedra.idr
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 84fa0bb

Please sign in to comment.