private static void parseInterClusterProbabilities(final Map<String, String> args,
		final CommandLineArguments result) throws ParseException
	{
		int k = result.cl_sizes.size();
		if (args.containsKey("p_out"))
		{
			double p_out;
			try
			{
				p_out = new Double(args.get("p_out"));
			}
			catch (final NumberFormatException nfex)
			{
				throw new ParseException("Error parsing p_out: '" + nfex.getMessage() + "'.");
			}
			verifyProbability(p_out, "p_out");
			result.p_out = p_out;
		}
		else if (args.containsKey("deg_out"))
		{
			int deg_out;
			try
			{
				deg_out = new Integer(args.get("deg_out"));
			}
			catch (final NumberFormatException nfex)
			{
				throw new ParseException("Error parsing deg_out: '" + nfex.getMessage() + "'.");
			}

			double sum = 0;
			for (int i = 0; i < k; ++i)
			{
				sum += result.cl_sizes.get(i) * (result.n - result.cl_sizes.get(i));
			}
			sum /= result.n; // average maximum deg_out

			result.p_out = deg_out / sum;
		}
	}