TransposeGraph

public struct TransposeGraph<Underlying> : BidirectionalGraph where Underlying : BidirectionalGraph
extension TransposeGraph: VertexListGraph where Underlying: VertexListGraph
extension TransposeGraph: EdgeListGraph where Underlying: EdgeListGraph
extension TransposeGraph: PropertyGraph where Underlying: PropertyGraph
extension TransposeGraph: SearchDefaultsGraph where Underlying: SearchDefaultsGraph

Transposes an underlying graph.

The transpose of a graph of the same number of vertices, but where the source and destination of every edge is reversed. TransposeGraph adapts a graph in constant space and constant time to operate as its transpose.

To continue to use property maps with the new graph, simply wrap them in TransposeGraphPropertyMapAdapter.

Note: the VerteId’s and EdgeId’s from the original graph are preserved, which ensures property maps continue to function.

All operations on a TransposeGraph operate with identical complexity as the underlying graph.

Available where Underlying: VertexListGraph

Available where Underlying: EdgeListGraph

Available where Underlying: PropertyGraph

Available where Underlying: SearchDefaultsGraph