GraphType trans = factory.createGraph();
GraphType trans = toolkit.createGraph();
	public GraphType transpose(GraphType orig, GraphFactory<GraphType, EdgeType, VertexType> factory) {		GraphType trans = factory.createGraph();		// For each vertex in original graph, create an equivalent		// vertex in the transposed graph,		// ensuring that vertex labels in the transposed graph		// match vertex labels in the original graph		for (Iterator<VertexType> i = orig.getVertexIterator(); i.hasNext(); ) {			VertexType v = (VertexType) i.next();			// Ensure transposed graph has same labeling as original			VertexType dupVertex = trans.addVertex();			dupVertex.setLabel(v.getLabel());			// Keep track of correspondence between equivalent vertices			m_origToTransposeMap.put(v, dupVertex);			m_transposeToOrigMap.put(dupVertex, v);		}		trans.setNumLabels(orig.getNumLabels());		// For each edge in the original graph, create a reversed edge		// in the transposed graph		for (Iterator<EdgeType> i = orig.getEdgeIterator(); i.hasNext(); ) {			EdgeType e = i.next();			VertexType transSource = m_origToTransposeMap.get(e.getTarget());			VertexType transTarget = m_origToTransposeMap.get(e.getSource());			trans.addEdge(transSource, transTarget);		}		return trans;	}