public void setState(States state) {
		Log.print(Log.system, "Converting graph to " + state);
		switch (state) {
		// ARR_ADJ -> ARR_INC
		case ARR_INC:
			convertToArrAdj();
			arr_inc = new int[N][M];
			clearGraph(States.ARR_INC);

			int curEdge = 0;
			for (int i = 0; i < N; i++) {
				for (int j = 0; j < N; j++) {
					if (arr_adj[i][j] != 0) {
						arr_inc[i][curEdge] = -arr_adj[i][j];
						arr_inc[j][curEdge] = arr_adj[i][j];
						curEdge++;
					}
				}

			}
			// for (int i = 0; i < N; i++) {
			// for (int j = 0; j < i; j++) {
			// if (arr_adj[i][j] != 0) {
			// arr_inc[i][curEdge] = -arr_adj[i][j];
			// arr_inc[j][curEdge] = arr_adj[i][j];
			// curEdge++;
			// }
			// }
			// }
			assert (curEdge <= M);
			break;
		// ANYTHING -> ARR_ADJ
		case ARR_ADJ:
			convertToArrAdj();
			break;
		// ARR_ADJ -> LIST_ADJ
		case LIST_ADJ:
			convertToArrAdj();
			clearGraph(States.LIST_ADJ);
			for (int i = 0; i < N; i++) {
				for (int j = 0; j < N; j++) {
					if (arr_adj[i][j] != 0) {
						list_adj[i].add(new ListNode(j, arr_adj[i][j]));
					}
				}
			}
			break;
		default:
			Log.print(Log.error, "Unexpected switch in convertGraph(Graph)");
			break;
		}
		this.state = state;
	}