public void getSimpleRandomGraph(mxAnalysisGraph aGraph, int numNodes, int numEdges, boolean allowSelfLoops,
			boolean allowMultipleEdges, boolean forceConnected)
	{
		mxGraph graph = aGraph.getGraph();
		Object parent = graph.getDefaultParent();
		Object[] vertices = new Object[numNodes];
		
		for (int i = 0; i < numNodes; i++)
		{
			vertices[i] = graph.insertVertex(parent, null, new Integer(i).toString(), 0, 0, 25, 25);
		}

		for (int i = 0; i < numEdges; i++)
		{
			boolean goodPair = true;
			Object startVertex;
			Object endVertex;

			do
			{
				goodPair = true;
				startVertex = vertices[(int) Math.round(Math.random() * (vertices.length - 1))];
				endVertex = vertices[(int) Math.round(Math.random() * (vertices.length - 1))];

				if (!allowSelfLoops && startVertex.equals(endVertex))
				{
					goodPair = false;
				}
				else if (!allowMultipleEdges && mxGraphStructure.areConnected(aGraph, startVertex, endVertex))
				{
					goodPair = false;
				}
			}
			while (!goodPair);

			graph.insertEdge(parent, null, getNewEdgeValue(aGraph), startVertex, endVertex);
		}

		if (forceConnected)
		{
			mxGraphStructure.makeConnected(aGraph);
		}
	};