private static double[] handleNegativity(double[][] table, boolean[] canBeNeg, int rows, int cols) {
		//TODO: false
		double[] maxima = new double[canBeNeg.length];
		for (int i = 0; i < canBeNeg.length; i++) {
			if (!canBeNeg[i]) {
				for (int j = 0; j < rows - 1; j++) {
					double current = Math.abs(table[j][cols - 1] / table[j][i]);
					if (!Double.isInfinite(current) && maxima[i] < current)
						maxima[i] = current;
				}

			}
		}

		for (int i = 0; i < canBeNeg.length; i++) {
			if (!canBeNeg[i]) {
				for (int j = 0; j < rows - 1; j++) {
					table[j][cols - 1] += table[j][i] * -maxima[i];
				}
			}
		}

		return maxima;
	}