public function PHPExcel_Shared_JAMA_Matrix::arrayRightDivideEquals in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/Matrix.php \PHPExcel_Shared_JAMA_Matrix::arrayRightDivideEquals()
* arrayRightDivideEquals * * Element-by-element right division * Aij = Aij / Bij *
Parameters
mixed $B Matrix/Array: * @return Matrix Matrix Aij
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Shared/ JAMA/ Matrix.php, line 741
Class
Code
public function arrayRightDivideEquals() {
if (func_num_args() > 0) {
$args = func_get_args();
$match = implode(",", array_map('gettype', $args));
switch ($match) {
case 'object':
if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) {
$M = $args[0];
}
else {
throw new PHPExcel_Calculation_Exception(self::ArgumentTypeException);
}
break;
case 'array':
$M = new PHPExcel_Shared_JAMA_Matrix($args[0]);
break;
default:
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
break;
}
$this
->checkMatrixDimensions($M);
for ($i = 0; $i < $this->m; ++$i) {
for ($j = 0; $j < $this->n; ++$j) {
$this->A[$i][$j] = $this->A[$i][$j] / $M
->get($i, $j);
}
}
return $M;
}
else {
throw new PHPExcel_Calculation_Exception(self::PolymorphicArgumentException);
}
}