public ArrayList<Double> solveSystem() {
	Collections.fill(x, 0.0);
	int k = 0;
	int size = x.size();
	double delta = 0.0;
	ArrayList<ArrayList<Integer>> rows = matrixA.getRowIndexes();
	do {
	    double t1 = 0.0;
	    double t2 = 0.0;
	    delta = 0.0;
	    for (int i = 0; i < size; i++) {
		t1 = b.get(i);
		t2 = 0.0;
		ArrayList<Integer> row = rows.get(i);
		for (Integer j : row) {
		    double element = matrixA.getElement(i, j);
		    t2 += element * x.get(j);
		}
		
		double value = (t1 - t2) / matrixA.getElement(i, i);
		double nI = value - x.get(i);
		nI = Math.abs(nI);
		delta += nI * nI;
		
		x.set(i, value);
	    }
	    delta = Math.sqrt(delta);
	} while (delta >= epsilon && k <= K_MAX && delta <= 100000000);
	
	if (delta < epsilon) {
	    return x;
	} else {
	    return null;
	}
    }