src/Alg/Math/Algebra/Matrix.php
public function swapRows( $row1, $row2 )
	{
		if( $row1 < 0 || $row1 >= $this->getRowNumber() )
			throw new OutOfRangeException( 'Source Row key "'.$row1.'" is not valid.' );
		if( $row2 < 0 || $row2 >= $this->getRowNumber() )
			throw new OutOfRangeException( 'Target Row key "'.$row2.'" is not valid.' );

		$buffer	= $this->values[$row2];
		$this->values[$row2]	= $this->values[$row1];
		$this->values[$row1]	= $buffer;
	}
public function swapRows( $row1, $row2 )
	{
		if( $row1 < 0 || $row1 >= $this->getRowNumber() )
			throw new OutOfRangeException( 'Source Row key "'.$row1.'" is not valid.' );
		if( $row2 < 0 || $row2 >= $this->getRowNumber() )
			throw new OutOfRangeException( 'Target Row key "'.$row2.'" is not valid.' );

		$buffer	= $this->values[$row2];
		$this->values[$row2]	= $this->values[$row1];
		$this->values[$row1]	= $buffer;
	}
public function swapRows ( $ row1 , $ row2 ) { if ( $ row1 < 0 || $ row1 >= $ this -> getRowNumber ( ) ) throw new OutOfRangeException ( 'Source Row key "' . $ row1 . '" is not valid.' ) ; if ( $ row2 < 0 || $ row2 >= $ this -> getRowNumber ( ) ) throw new OutOfRangeException ( 'Target Row key "' . $ row2 . '" is not valid.' ) ; $ buffer = $ this -> values [ $ row2 ] ; $ this -> values [ $ row2 ] = $ this -> values [ $ row1 ] ; $ this -> values [ $ row1 ] = $ buffer ; }
Swaps 2 Rows within Matrix.
@access		public
@param		int			$row1			Index of Source Row
@param		int			$row2			Index of Target Row
@return		void
Swaps 2 Rows within Matrix .