edu.umd.cs.findbugs.graph

Class Transpose<GraphType,EdgeType,VertexType>

public class Transpose<GraphType extends Graph<EdgeType,VertexType>,EdgeType extends GraphEdge<EdgeType,VertexType>,VertexType extends GraphVertex<VertexType>> extends Object

Algorithm to transpose a graph.
Constructor Summary
Transpose()
Constructor.
Method Summary
VertexTypegetOriginalGraphVertex(VertexType v)
Get the vertex in the original graph which corresponds to the given vertex in the transposed graph.
VertexTypegetTransposedGraphVertex(VertexType v)
Get the vertex in the transposed graph which corresponds to the given vertex in the original graph.
GraphTypetranspose(GraphType orig, GraphToolkit<GraphType,EdgeType,VertexType> toolkit)
Transpose a graph.

Constructor Detail

Transpose

public Transpose()
Constructor.

Method Detail

getOriginalGraphVertex

public VertexType getOriginalGraphVertex(VertexType v)
Get the vertex in the original graph which corresponds to the given vertex in the transposed graph.

Parameters: v the vertex in the transposed graph

Returns: the equivalent vertex in the original graph

getTransposedGraphVertex

public VertexType getTransposedGraphVertex(VertexType v)
Get the vertex in the transposed graph which corresponds to the given vertex in the original graph.

Parameters: v the vertex in the original graph

Returns: the equivalent vertex in the transposed graph

transpose

public GraphType transpose(GraphType orig, GraphToolkit<GraphType,EdgeType,VertexType> toolkit)
Transpose a graph. Note that the original graph is not modified; the new graph and its vertices and edges are new objects.

Parameters: orig the graph to transpose toolkit a GraphToolkit to be used to create the transposed Graph

Returns: the transposed Graph

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.