Created
December 28, 2011 10:27
-
-
Save drdozer/1527489 to your computer and use it in GitHub Desktop.
Simplified Graph trait
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Graph[V, E] { | |
type Col[A] | |
type Incidence[A] | |
def vertices: Col[V] | |
def edges: Col[E] | |
def incidenceOption(e: E): Incidence[V] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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