getEdge method
Implementation
@override
Edge getEdge(Vertex a, Vertex b) {
UndirectedEdge foundEdge;
if (graph[a]!.any((element) => element.b.equalsById(b))) {
foundEdge = graph[a]!.firstWhere((element) => element.b.equalsById(b))
as UndirectedEdge;
} else {
foundEdge = graph[b]!.firstWhere((element) => element.a.equalsById(a))
as UndirectedEdge;
}
return foundEdge;
}