public List<LinkedList<int>> GetConnectivityGraph()
{
List<LinkedList<int>> list = new List<LinkedList<int>>(jointList.Count);
for (int i = 0; i < jointList.Count; i++)
list.Add(null);
foreach (LineElement element in lineList)
{
if (element != null && element.I != null && element.J != null)
{
int i = (int)element.I.Id;
int j = (int)element.J.Id;
if (list[i] == null)
list[i] = new LinkedList<int>();
if (list[j] == null)
list[j] = new LinkedList<int>();
list[i].AddLast(j);
list[j].AddLast(i);
}
}
return list;
}