private void dfs (int nodeIndex, boolean[] visited) {
		
		if (visited[nodeIndex] == false) {
			visit(nodes[nodeIndex]);
			visited[nodeIndex] = true;			
		}
		for (int i=0; i<getNumNodes(); i++) {
			if (visited[i] == false && dists[nodeIndex][i]>0) {
				visit(nodes[i]);
				visited[i] = true;
				dfs(i,visited);
			}
		}		
	}