public float getH(State cState) {
		float heuri = 0;
		TSPState TSPcState = (TSPState) cState;
		ArrayList visited = ((TSPState) cState).getVisited();
		int current = TSPcState.getCurrent();
		if (visited.size() == size + 1) { // If State is Goal
			return heuri;
		} else if (visited.size() == size) { // If every City is visited
			return dist[current][initial];
		} else { // Else
			float minInit = Float.MAX_VALUE;
			float minNext = Float.MAX_VALUE;
			ArrayList<Integer> notVisited = new ArrayList<Integer>();

			for (int i = 0; i < size; i++) {
				if (!visited.contains(i)) {
					notVisited.add(i);
					float distanceInit = dist[initial][i];
					
					if (minInit > distanceInit && distanceInit > 0) {
						minInit = distanceInit;
					}
					float distanceNext = dist[current][i];
					if (minNext > distanceNext && distanceNext > 0) {
						minNext = distanceNext;
					}
				}
			}
			//float prim = prim(notVisited, notVisited.size());
			float prim = primAlt(notVisited);
			heuri = minInit + minNext + prim;
			return heuri;
		}
	}