public function PHPExcel_Shared_JAMA_Matrix::transpose in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/Matrix.php \PHPExcel_Shared_JAMA_Matrix::transpose()
* transpose * * Tranpose matrix *
Return value
Matrix Transposed matrix
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Shared/ JAMA/ Matrix.php, line 380
Class
Code
public function transpose() {
$R = new PHPExcel_Shared_JAMA_Matrix($this->n, $this->m);
for ($i = 0; $i < $this->m; ++$i) {
for ($j = 0; $j < $this->n; ++$j) {
$R
->set($j, $i, $this->A[$i][$j]);
}
}
return $R;
}