private void countEdges() {
		int edges = 0;
		if (getState() == States.ARR_ADJ)
			for (int i = 0; i < N; i++)
				for (int j = 0; j < N; j++)
					if (arr_adj[i][j] != 0)
						edges++;
		this.M = edges;
	}