For jollies I'm trying to implement a graph data structure as an interface, so that I can implement graph classes either as adjacency lists (lists of lists of edges) or as adjacency matrices ( a 2 dimensional array of edges) with a minimum of additional code.
My question is, is there a way I can implement the IGraph interface so that either this:
LinkedList<LinkedList<IEdge>>
or this:
IEdge[,]
will be valid types? I have everything else thought out except this.