double[][] (Groovy JDK enhancements)

Package:

## Class double[][]

- - ### Methods Summary

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

- - ### Methods Detail

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

      Select a column from a 2D array.

          double[][] nums = [[1.0d, 2.0d], [10.0d, 20.0d]]
          assert nums.column(0) == [1.0d, 10.0d] as double[]
          assert nums.column(1) == [2.0d, 20.0d] as double[]

      Parameters:
      Returns:
        a double[]
      Since:
        5.0.0

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

      Process the columns of the array.

          double[][] nums = [[1.0d, 2.0d], [10.0d, 20.0d]]
          nums.eachColumn {
              assert it[0] * 10.0d == 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:

          double[][] array = [[0.0f, 1.0f], [2.0f, 3.0f]]
          assert array.flatten() == [0.0f, 1.0f, 2.0f, 3.0f]

      Returns:
        a Collection of the array elements
      Since:
        5.0.0

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

      A transpose method for 2D double arrays.

      Example usage:

          double[][] doubles = [[1.0d, 10.0d], [2.0d, 20.0d]]
          double[][] expected = [[1.0d, 2.0d], [10.0d, 20.0d]]
          def result = doubles.transpose()
          assert result == expected
          assert doubles.class.componentType == result.class.componentType

      Returns:
        the transposed 2D double array
      Since:
        3.0.8

    - #### public Iterator transposing()

      An iterator of the columns of the array.

          double[][] nums = [[1.0d, 2.0d], [10.0d, 20.0d]]
          assert nums.transpose() == nums.transposing().toList()

      Returns:
        the iterator
      Since:
        5.0.0