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

Multidimensional counter

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.2
    • None
    • None

    Description

      Utility that converts from indices in a multidimensional structure to the corresponding index in a one-dimensional array.

      E.g. assuming that the ranges (in 3D) of indices are

      {2, 4, 3}

      , we'll have that
      (0, 0, 0) corresponds to 0
      (0, 0, 1) corresponds to 1
      ...
      (1, 0, 0) corresponds to 12
      ...
      (1, 3, 2) corresponds to 23

      I propose to add this class in the "util" package.

      Attachments

        1. MultidimensionalCounter.java
          6 kB
          Gilles Sadowski

        Activity

          People

            erans Gilles Sadowski
            erans Gilles Sadowski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: