public void getBipartiteGraph(mxAnalysisGraph aGraph, int numVerticesGroup1, int numVerticesGroup2)
	{
		if (numVerticesGroup1 < 0 || numVerticesGroup2 < 0)
		{
			throw new IllegalArgumentException();
		}

		int numVertices = numVerticesGroup1 + numVerticesGroup2;
		mxGraph graph = aGraph.getGraph();
		Object parent = graph.getDefaultParent();
		Object[] vertices = new Object[numVertices];
		
		for (int i = 0; i < numVertices; i++)
		{
			vertices[i] = graph.insertVertex(parent, null, new Integer(i).toString(), 0, 0, 25, 25);
		}

		for (int i = 0; i < numVerticesGroup1; i++)
		{
			Object currVertex = vertices[i];
			Object destVertex = vertices[getRandomInt(numVerticesGroup1, numVertices - 1)];
			graph.insertEdge(parent, null, getNewEdgeValue(aGraph), currVertex, destVertex);
		}

		for (int j = 0; j < numVerticesGroup2; j++)
		{
			Object currVertex = vertices[numVerticesGroup1 + j];
			int edgeNum = aGraph.getOpposites(aGraph.getEdges(currVertex, null, true, true, false, true), currVertex, true, true).length;

			if (edgeNum == 0)
			{
				Object destVertex = vertices[getRandomInt(0, numVerticesGroup1 - 1)];
				graph.insertEdge(parent, null, getNewEdgeValue(aGraph), currVertex, destVertex);
			}
		}
	};