protected function move($pos, $level)
	{
		$validMove = $this->validateMove($pos);
		
		// Skip invalid move
		if ( ! $validMove) {
			return $this;
		}

		// Functionality with better performance
		$levelDiff = $level - $this->getLevel();
		$this->repository->move($this, $pos, $levelDiff);

//		$spaceNeeded = $this->getIntervalSize() + 1;
//		
//		// I) reserve the space
//		$this->repository->extend($pos, $spaceNeeded);
//
//		$oldPos = $this->getLeftValue();
//		$levelDiff = $level - $this->getLevel();
//
//		// II) move the node to the place
//		$this->repository->oldMove($this, $pos, $levelDiff);
//
//		// III) trim the unused space
//		$this->repository->truncate($oldPos, $spaceNeeded);

		return $this;
	}
protected function move($pos, $level)
	{
		$validMove = $this->validateMove($pos);
		
		// Skip invalid move
		if ( ! $validMove) {
			return $this;
		}

		// Functionality with better performance
		$levelDiff = $level - $this->getLevel();
		$this->repository->move($this, $pos, $levelDiff);

//		$spaceNeeded = $this->getIntervalSize() + 1;
//		
//		// I) reserve the space
//		$this->repository->extend($pos, $spaceNeeded);
//
//		$oldPos = $this->getLeftValue();
//		$levelDiff = $level - $this->getLevel();
//
//		// II) move the node to the place
//		$this->repository->oldMove($this, $pos, $levelDiff);
//
//		// III) trim the unused space
//		$this->repository->truncate($oldPos, $spaceNeeded);

		return $this;
	}
protected function move ( $ pos , $ level ) { $ validMove = $ this -> validateMove ( $ pos ) ; // Skip invalid move if ( ! $ validMove ) { return $ this ; } // Functionality with better performance $ levelDiff = $ level - $ this -> getLevel ( ) ; $ this -> repository -> move ( $ this , $ pos , $ levelDiff ) ; //		$spaceNeeded = $this->getIntervalSize() + 1; //		 //		// I) reserve the space //		$this->repository->extend($pos, $spaceNeeded); // //		$oldPos = $this->getLeftValue(); //		$levelDiff = $level - $this->getLevel(); // //		// II) move the node to the place //		$this->repository->oldMove($this, $pos, $levelDiff); // //		// III) trim the unused space //		$this->repository->truncate($oldPos, $spaceNeeded); return $ this ; }
Inner move function for node
@param int $pos
@param int $level
@return NodeAbstraction
Inner move function for node