/** * Creates normal distribution. * * @return Instance of {@link NormalDistribution}. */ @SuppressWarnings({ "unchecked", "rawtypes" }) protected NormalDistribution createNormalDistribution() { List<Number> args = (List) pop(); if (args.isEmpty()) { return new NormalDistribution(); } if (args.size() != 4) { throw new RuntimeException("Normal distribution must have following parameters:" + " mean, standard deviation, lower bound and upper bound."); } return new NormalDistribution(args.get(0).doubleValue(), args.get(1).doubleValue(), args.get(2).doubleValue(), args.get(3).doubleValue()); }
/** * Creates normal distribution. * * @return Instance of {@link NormalDistribution}. */ @SuppressWarnings({ "unchecked", "rawtypes" }) protected NormalDistribution createNormalDistribution() { List<Number> args = (List) pop(); if (args.isEmpty()) { return new NormalDistribution(); } if (args.size() != 4) { throw new RuntimeException("Normal distribution must have following parameters:" + " mean, standard deviation, lower bound and upper bound."); } return new NormalDistribution(args.get(0).doubleValue(), args.get(1).doubleValue(), args.get(2).doubleValue(), args.get(3).doubleValue()); }