private Quartet<Double, Double, Double, Double> errors(List<OpenCellIdCell> cells, int n, double d) {
		double errorDistance = 0.0;
		double errorRSS = 0.0;
		
		double timeDistance = 0.0;
		double timeRSS = 0.0;
		
		int cellCounter = 0;
		
		for(OpenCellIdCell cell : cells) {
			
			int currN = n;
			if(cell.getMeasurements().size() < currN)
				currN = cell.getMeasurements().size();
			
			cellCounter++;
			if(cellCounter%50==0)
				System.out.println("Estimated for "+cellCounter+" cells..");
			
			double errorCellDistance = 0.0;
			double errorCellRSS = 0.0;
			
			Stopwatch stopWatchCellDistance = new Stopwatch();
			Stopwatch stopWatchCellRSS = new Stopwatch();
			
			for(int k = 0; k < 5; k++) {
				stopWatchCellDistance.start();
				Computation compDistance = Generate.computation(cell, currN, d, false);
				stopWatchCellDistance.stop();
				
				stopWatchCellRSS.start();
				Computation compRSS = Generate.computation(cell, currN, d, true);
				stopWatchCellRSS.stop();
				
				errorCellDistance += Generate.sphericalError(cell, compDistance.getHeuristicCell1());
				errorCellRSS += Generate.sphericalError(cell, compRSS.getHeuristicCell1());
			}
			
			errorCellDistance = errorCellDistance/5.0;
			errorCellRSS = errorCellRSS/5.0;
			
			errorDistance += errorCellDistance;
			errorRSS += errorCellRSS;
			
			timeDistance += stopWatchCellDistance.averageTime();
			timeRSS += stopWatchCellRSS.averageTime();
					
		}
		errorDistance = errorDistance/cells.size();
		errorRSS = errorRSS/cells.size();
		
		timeDistance = timeDistance/cells.size();
		timeRSS = timeRSS/cells.size();
		
		return new Quartet<Double, Double, Double, Double>(errorDistance, timeDistance, errorRSS, timeRSS);
	}