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

IndexOutOfBoundsException when calling PolygonsSet.getSize()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.6.1
    • Fix Version/s: None
    • Labels:
    • Environment:

      Linux Fedora
      Java 8

      Description

      Running the following code produces an IndexOutOfBoundsException:

      public static void main(String[] args)

      { List<Vector2D> vectors = new ArrayList<>(); vectors.add(new Vector2D(1, 1)); vectors.add(new Vector2D(1_189, 1)); vectors.add(new Vector2D(1_697_165, 147)); vectors.add(new Vector2D(1_592_444, 249_323)); vectors.add(new Vector2D(248_665, 110_887)); vectors.add(new Vector2D(37_142, 24_654)); vectors.add(new Vector2D(10_093, 8_137)); vectors.add(new Vector2D(966, 823)); vectors.add(new Vector2D(25, 25)); new MonotoneChain().generate(vectors).createRegion().getSize(); }

      Forgive the weird vector values!

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: