Mahout
  1. Mahout
  2. MAHOUT-750

IndexOutOfBoundsException within sort method of OnlineSummarizer

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 0.5
    • Fix Version/s: 0.6
    • Component/s: Math
    • Labels:
      None

      Description

      When the total number of samples added to OnlineSummarizer is less than 100 , then sort() will thrown this :

      private void sort() {
      if (!sorted && starter != null)

      { starter.sortFromTo(0, 99); sorted = true; }

      }

      And I think it should be
      private void sort() {
      if (!sorted && starter != null)

      { starter.sortFromTo(0, Math.min(starter.size() - 1, 99)); sorted = true; }

      }

        Activity

        Hide
        Sean Owen added a comment -

        This "patch" is not against HEAD, as it is already fixed in HEAD. That's the good news but I'd advise you to work off HEAD if you're developing.

        Show
        Sean Owen added a comment - This "patch" is not against HEAD, as it is already fixed in HEAD. That's the good news but I'd advise you to work off HEAD if you're developing.
        Hide
        Sean Owen added a comment -

        Duplicate of MAHOUT-692

        Show
        Sean Owen added a comment - Duplicate of MAHOUT-692

          People

          • Assignee:
            Sean Owen
            Reporter:
            XiaoboGu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development