Minor performance tweaks
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@63709 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
270ea1df05
commit
9c9657a2e2
|
@ -2316,10 +2316,12 @@ class PHPExcel_Calculation {
|
||||||
|
|
||||||
if ($resize == 2) {
|
if ($resize == 2) {
|
||||||
// Given two matrices of (potentially) unequal size, convert the smaller in each dimension to match the larger
|
// Given two matrices of (potentially) unequal size, convert the smaller in each dimension to match the larger
|
||||||
self::_resizeMatricesExtend($operand1,$operand2);
|
self::_resizeMatricesExtend($operand1,$operand2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns);
|
||||||
|
// self::_resizeMatricesExtend($operand1,$operand2);
|
||||||
} elseif ($resize == 1) {
|
} elseif ($resize == 1) {
|
||||||
// Given two matrices of (potentially) unequal size, convert the larger in each dimension to match the smaller
|
// Given two matrices of (potentially) unequal size, convert the larger in each dimension to match the smaller
|
||||||
self::_resizeMatricesShrink($operand1,$operand2);
|
self::_resizeMatricesShrink($operand1,$operand2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns);
|
||||||
|
// self::_resizeMatricesShrink($operand1,$operand2);
|
||||||
}
|
}
|
||||||
} // function _checkMatrixOperands()
|
} // function _checkMatrixOperands()
|
||||||
|
|
||||||
|
@ -2353,8 +2355,9 @@ class PHPExcel_Calculation {
|
||||||
* @param mixed &$matrix2 Second matrix operand
|
* @param mixed &$matrix2 Second matrix operand
|
||||||
*/
|
*/
|
||||||
private static function _resizeMatricesShrink(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) {
|
private static function _resizeMatricesShrink(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) {
|
||||||
list($matrix1Rows,$matrix1Columns) = self::_getMatrixDimensions($matrix1);
|
// private static function _resizeMatricesShrink(&$matrix1,&$matrix2) {
|
||||||
list($matrix2Rows,$matrix2Columns) = self::_getMatrixDimensions($matrix2);
|
// list($matrix1Rows,$matrix1Columns) = self::_getMatrixDimensions($matrix1);
|
||||||
|
// list($matrix2Rows,$matrix2Columns) = self::_getMatrixDimensions($matrix2);
|
||||||
|
|
||||||
if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {
|
if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {
|
||||||
if ($matrix2Columns < $matrix1Columns) {
|
if ($matrix2Columns < $matrix1Columns) {
|
||||||
|
@ -2394,9 +2397,10 @@ class PHPExcel_Calculation {
|
||||||
* @param mixed &$matrix1 First matrix operand
|
* @param mixed &$matrix1 First matrix operand
|
||||||
* @param mixed &$matrix2 Second matrix operand
|
* @param mixed &$matrix2 Second matrix operand
|
||||||
*/
|
*/
|
||||||
private static function _resizeMatricesExtend(&$matrix1,&$matrix2) {
|
private static function _resizeMatricesExtend(&$matrix1,&$matrix2,$matrix1Rows,$matrix1Columns,$matrix2Rows,$matrix2Columns) {
|
||||||
list($matrix1Rows,$matrix1Columns) = self::_getMatrixDimensions($matrix1);
|
// private static function _resizeMatricesExtend(&$matrix1,&$matrix2) {
|
||||||
list($matrix2Rows,$matrix2Columns) = self::_getMatrixDimensions($matrix2);
|
// list($matrix1Rows,$matrix1Columns) = self::_getMatrixDimensions($matrix1);
|
||||||
|
// list($matrix2Rows,$matrix2Columns) = self::_getMatrixDimensions($matrix2);
|
||||||
|
|
||||||
if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {
|
if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) {
|
||||||
if ($matrix2Columns < $matrix1Columns) {
|
if ($matrix2Columns < $matrix1Columns) {
|
||||||
|
|
Loading…
Reference in New Issue