Skip to content

Instantly share code, notes, and snippets.

@drdozer
Created December 28, 2011 10:27
Show Gist options
  • Save drdozer/1527489 to your computer and use it in GitHub Desktop.
Save drdozer/1527489 to your computer and use it in GitHub Desktop.
Simplified Graph trait
trait Graph[V, E] {
type Col[A]
type Incidence[A]
def vertices: Col[V]
def edges: Col[E]
def incidenceOption(e: E): Incidence[V]
}
trait GraphT[G, V, E] {
type Col[A]
type Incidence[A]
def vertices(g: G): Col[V]
def edges(g: G): Col[E]
def incidenceOption(g: G, e: E): Incidence[V]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment