public function equals(Vector $v) {
		if($this->dimension != $v->getDimensions()) {
			throw new Exception("Both vectors must have the same size");
		}

		$otherComponents = $v->toArray();
		$ret = true;
		for($i = 0; $ret && $i < $this->dimension; ++$i) {
			$ret = ($this->components[$i] == $otherComponents[$i]);
		}
		return $ret;
	}