ogdf/ogdf — pull request #3 by 93arpit (2014-02-26 14:36:43+00:00)
Title: randomSimpleGraph now supports generating trees

Carsten gave me the consent to make the changes. Along with this pull request, I have also sent the updated file to Carsten. I used the following code to check the updated function.

#include
#include
#include
using namespace ogdf;

int main()
{
Graph G;
int connected_count=0,tree_count=0;
int n, m, max_edges;
//randomSimpleGraph(G, 3, 4);
for (int i=1;i<=10000;i++)
{
G.clear();
n=randomNumber(1,200);
max_edges=n*(n-1)/2;
m=randomNumber(0,max_edges);
randomSimpleGraph(G, n, m);
if (isConnected(G)) connected_count++;
if (isTree(G)) tree_count++;
}
std::cout<