outDegreeMap property

Map<Vertex<T>, int> outDegreeMap

Returns a mapping between vertex and number of outgoing connections (edges).

Implementation

Map<Vertex<T>, int> get outDegreeMap {
  var map = <Vertex<T>, int>{};
  for (var vertex in vertices) {
    map[vertex] = _edges[vertex]?.length ?? 0;
  }
  return map;
}