reversed property

Graph<V, E> reversed

Returns a graph where all edges point in the opposite direction.

Implementation

Graph<V, E> get reversed => switch (this) {
      ReversedGraph<V, E>(delegate: final delegate) => delegate,
      Graph<V, E>(isDirected: true) => ReversedGraph<V, E>(this),
      _ => this
    };