public static final List<Double> removeNaNsAndInfinites(Collection<? extends Number> c) {
		List<Double> out = new LinkedList<Double>();
		for (Number n : c) {
			double v = n.doubleValue();
			if (!(Double.isNaN(v) || Double.isInfinite(v))) {
				out.add(v);
			}
		}
		return out;
	}