@Test
void testAsMatrix() {

  DoubleColumn first = DoubleColumn.create("c1", new double[] {1L, 2L, 3L, 4L, 5L});
  DoubleColumn second = DoubleColumn.create("c2", new double[] {6.0f, 7.0f, 8.0f, 9.0f, 10.0f});
  DoubleColumn third = DoubleColumn.create("c3", new double[] {10.0, 20.0, 30.0, 40.0, 50.0});
  Table t = Table.create("table", first, second, third);
  double[][] matrix = t.as().doubleMatrix();
  assertEquals(5, matrix.length);
  assertArrayEquals(new double[] {1.0, 6.0, 10.0}, matrix[0], 0.0000001);
  assertArrayEquals(new double[] {2.0, 7.0, 20.0}, matrix[1], 0.0000001);
  assertArrayEquals(new double[] {3.0, 8.0, 30.0}, matrix[2], 0.0000001);
  assertArrayEquals(new double[] {4.0, 9.0, 40.0}, matrix[3], 0.0000001);
  assertArrayEquals(new double[] {5.0, 10.0, 50.0}, matrix[4], 0.0000001);
}