public static boolean assertVectorsEqual(double[] first, double[] second,
			int decimalPlaces) {

		int firstColumns = first.length;
		int secondColumns = second.length;

		if (firstColumns != secondColumns) {

			return false;

		}

		for (int column = 0; column < firstColumns; column++) {

			double firstColumn = first[column];
			double secondColumn = second[column];

			BigDecimal firstValue = new BigDecimal(firstColumn).divide(
					BigDecimal.ONE, decimalPlaces, RoundingMode.HALF_EVEN);

			BigDecimal secondValue = new BigDecimal(secondColumn).divide(
					BigDecimal.ONE, decimalPlaces, RoundingMode.HALF_EVEN);

			if (firstValue.compareTo(secondValue) != 0) {

				return false;

			}

		}

		return true;

	}