data property

Map<T, Map<T, W>> data

Returns a copy of the weighted edges as an object of type Map<T, Map<T, W>>.

Implementation

Map<T, Map<T, W>> get data {
  final out = <T, Map<T, W>>{};
  for (final vertex in sortedVertices) {
    out[vertex] = Map.of(_edges[vertex]!);
  }
  return out;
}