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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.4
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: