public static void saveToFile(List<String[]> adjacencyMatrix) {
		FileOutputStream out = null;
		OutputStreamWriter osw = null;
		BufferedWriter bw = null;
		try {
			String fileName = "temp/" + System.currentTimeMillis() + ".csv";
			File csvFile = new File(fileName);
			out = new FileOutputStream(csvFile);
			osw = new OutputStreamWriter(out);
			bw = new BufferedWriter(osw);

			int numOfVertex = adjacencyMatrix.size();
			bw.write(numOfVertex+"\r\n");
			for (int i = 0; i < numOfVertex; i++) {
				String[] row = adjacencyMatrix.get(i);
				StringBuffer sb = new StringBuffer();
				for (int j = 0; j < numOfVertex; j++) {
					sb.append(row[j]).append(",");
				}
				bw.write(sb.subSequence(0, sb.length() - 1) + "\r\n");

			}

		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			try {
				bw.close();
				osw.close();
				out.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

	}