public Object[] update(double D[][], int L[], double A[][], int n, int nA, double F[][], double FA[][]) {
        // Replace A into D and FA into F using the indices stored in L,
        for (int i = 0; i < nA; i++) {
            for (int j = 0; j < n; j++) {
                D[L[i]][j] = A[i][j];
            }
            for (int j = 0; j < FA[0].length; j++) {
                F[L[i]][j] = FA[i][j];
            }
        }
        return new Object[]{D, F};
    }