LINQ, creating unique collection of a collection
- by Wish
I have class Vertex and a class Edge (Edge holds 2 properties - Vertex Source and Vertex Target);
Edges and Vertexes are collected into lists
Some example:
A-->B // edge from vertex A to B
B-->C // edge from vertex B to C
C-->A // edge from vertex C to A
A-->C // edge from vertex A to C -- this is two way edge
So I would like to make IDictionary<Edge, bool> which would hold edges (A--B and B--A would be like 1), and bool - if it is two way or no.
I need it because when I draw them now, it draws 2 arrows under one another. I would better make 1 arrow.
So I'm pretty stuck right here... May anybody help me a bit ?