//-------------------------------------------------------------------------
        public virtual void test_forEach()
        {
            double[][] @base = new double[][]
            {
                new double[] { 1d, 2d },
                new double[] { 3d, 4d },
                new double[] { 5d, 6d }
            };
            DoubleMatrix test = DoubleMatrix.copyOf(@base);

            double[] extracted = new double[6];
            test.forEach((i, j, v) => extracted[i * 2 + j] = v);
            assertTrue(Arrays.Equals(extracted, new double[] { 1d, 2d, 3d, 4d, 5d, 6d }));
        }