You are here

public function PHPExcel_Shared_JAMA_Matrix::transpose in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.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

PHPExcel_Shared_JAMA_Matrix

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;
}