Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ArrayList;

public class Main {
    public static double[][] toArray(ArrayList<ArrayList<Double>> a) {
        int dataDimen = a.size();
        double[][] res = new double[dataDimen][dataDimen];

        for (int i = 0; i < dataDimen; i++) {
            for (int j = 0; j < dataDimen; j++) {
                res[i][j] = a.get(i).get(j);
            }
        }

        return res;
    }
}