Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1141

UniformIntegerDistribution should make constructer a exclusive bound or made parameter check more relax

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4
    • Labels:
      None

      Description

      UniformIntegerDistribution constructer public UniformIntegerDistribution(RandomGenerator rng,
      int lower,
      int upper)
      the lower and the upper all inclusive. but the parameter check made a if (lower >= upper) {
      throw new NumberIsTooLargeException(
      LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND,
      lower, upper, false);
      check, i think it is too strict
      to construct UniformIntegerDistribution (0,0)
      this should make it possible

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              milesandnick milesandnick
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: