public static void main(String[] args) {
		
		long start = System.nanoTime();
		AdjacencyList al = createTestGraph();
		Matrix B = computeModMatrix(al);
		EigenvalueDecomposition decomp = B.eig();
		double[] eigenvalues = decomp.getRealEigenvalues();
		double[][] eigenvectors = decomp.getV().transpose().getArray();
		double greatest = 0.001;
		int indexOfGreatest = -1;
		for (int i = 0; i < eigenvalues.length; i++) {
			if (eigenvalues[i] > greatest) {
				indexOfGreatest = i;
				greatest = eigenvalues[i];
			}
		}
		if (indexOfGreatest != -1) {
			// System.out.println("Graph successfully partitioned with lambda = " + eigenvalues[indexOfGreatest]);
			double[] u = eigenvectors[indexOfGreatest];
			Set<Integer> c1 = new HashSet<Integer>(), c2 = new HashSet<Integer>(), c3 = new HashSet<Integer>();
			for (int i = 0; i < u.length; i++) {
				// System.out.println("Vertex #" + i + " has an eigenvector index: " + u[i]);
				if (u[i] > 0.1) {
					c1.add(i);
				} else if (u[i] < -0.1){
					c2.add(i);
				} else {
					c3.add(i);
				}
			}
			System.out.println("Community #1 consists of: " + c1);
			System.out.println("Community #2 consists of: " + c2);
			System.out.println("The lonely nodes consist of: " + c3 + "     so sad... :(");
		} else {
			System.out.println("No partition found...indivisible graph reached.");
		}
		System.out.println("Total time taken: " + (System.nanoTime() - start)/1000000.0 + " ms");
	}