private static void assertNum(int totalCounts,
			List<List<Double>> dataPointsUnnormalized) throws Exception
	{
		int sum = 0;

		for (int x = 0; x < dataPointsUnnormalized.size(); x++)
			for (int y = 0; y < dataPointsUnnormalized.get(x).size(); y++)
				sum += dataPointsUnnormalized.get(x).get(y);

		if (totalCounts != sum)
			throw new Exception("Logic error " + totalCounts + " " + sum);

		if (dataPointsUnnormalized.size() > 0)
		{
			int length = dataPointsUnnormalized.get(0).size();

			for (int x = 0; x < dataPointsUnnormalized.size(); x++)
				if (length != dataPointsUnnormalized.get(x).size())
					throw new Exception("Jagged array");
		}
	}