int[][] (Groovy JDK enhancements)

Package:

## Class int[][]

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `int[]` | `column(int col)` Select a column from a 2D array.
    `int[][]` | `eachColumn(Closure closure)` Process the columns of the array.
    `List` | `flatten()` Flattens a 2D array into a new collection.
    `int[][]` | `transpose()` A transpose method for 2D int arrays.
    `Iterator` | `transposing()` An iterator of the columns of the array.

- - ### Methods Detail

    - #### public int[] column(int col)

      Select a column from a 2D array.

          int[][] nums = [[1, 2], [10, 20]]
          assert nums.column(0) == [1, 10] as int[]
          assert nums.column(1) == [2, 20] as int[]

      Parameters:
      Returns:
        an int[]
      Since:
        5.0.0

    - #### public int[][] eachColumn(Closure closure)

      Process the columns of the array.

          double[][] nums = [[1, 2], [10, 20]]
          nums.eachColumn {
              assert it[0] * 10 == it[1]
          }

      Parameters:
        `closure` - the closure applied on each array column
      Returns:
        the self array
      Since:
        5.0.0

    - #### public List flatten()

      Flattens a 2D array into a new collection. The items are copied row by row.

      Example usage:

          int[][] array = [[0, 1], [2, 3]]
          assert array.flatten() == [0, 1, 2, 3]

      Returns:
        a Collection of the array elements
      Since:
        5.0.0

    - #### public int[][] transpose()

      A transpose method for 2D int arrays.

      Example usage:

          int[][] nums = [[10, 15, 20], [30, 35, 40]]
          int[][] expected = [[10, 30], [15, 35], [20, 40]]
          assert nums.transpose() == expected

      Returns:
        the transposed 2D int array
      Since:
        3.0.8

    - #### public Iterator transposing()

      An iterator of the columns of the array.

          int[][] nums = [[1, 2], [10, 20]]
          assert nums.transpose() == nums.transposing().toList()
          assert nums.transposing().collect{ int[] col -> col.sum() } == [11, 22]

      Returns:
        the iterator
      Since:
        5.0.0