if(outputGraphType == OutputGraphType.COMPLETE_GRAPH)
{
/*
* For every src and sink in the input graph, create an edge in the output graph
*/
Graph graphTransitive = ((Graph)this.m_graph2Listen).getTransitiveClosureGraph();
for(Agent src: (Set<Agent>) graphTransitive.vertexSet())
{
for(Agent sink: (Set<Agent>) graphTransitive.vertexSet())
{
if(!src.equals(sink))
{
m_graph2Output.addVertex(src);
m_graph2Output.addVertex(sink);
m_graph2Output.addEdge(src, sink);
}
}
}
}
else if(outputGraphType == OutputGraphType.TRANSITIVE_GRAPH)
{
/*
* Find the transitive closure edges of the input graph and add them to the output grph
*/
Graph graphTransitive = ((Graph)this.m_graph2Listen).getTransitiveClosureGraph();
for(TestbedEdge edge : (Set<TestbedEdge>)graphTransitive.edgeSet())
{
Agent src = (Agent)edge.src;
Agent sink = (Agent)edge.sink;
m_graph2Output.addVertex(src);
m_graph2Output.addVertex(sink);