getNeighboringEdgesOfEdge method

  1. @override
List<DirectedEdge> getNeighboringEdgesOfEdge(
  1. Edge edge
)
override

Gets all neighboring edges of an edge

Implementation

@override
List<DirectedEdge> getNeighboringEdgesOfEdge(Edge edge) {
  List<DirectedEdge> found = [];
  getOutgoingEdges(edge.a).forEach((element) {
    found.add(element);
  });

  getOutgoingEdges(edge.b).forEach((element) {
    if (element.target != edge.a) {
      found.add(element);
    }
  });

  // Remove the edge itself
  found.remove(edge);

  return found;
}