~agasti-rhok-02/sahana-agasti/mayon-rhok-02

« back to all changes in this revision

Viewing changes to plugins/sfPhpExcelPlugin/lib/PHPExcel/PHPExcel/Shared/trend/polynomialBestFitClass.php

  • Committer: Chad Heuschober
  • Date: 2010-12-04 04:01:41 UTC
  • mfrom: (1.2.1 mayon)
  • Revision ID: chad.heuschober@mail.cuny.edu-20101204040141-orjw950gt411jzmt
Merged changes from r2 of project trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
/**
3
3
 * PHPExcel
4
4
 *
5
 
 * Copyright (c) 2006 - 2008 PHPExcel
 
5
 * Copyright (c) 2006 - 2010 PHPExcel
6
6
 *
7
7
 * This library is free software; you can redistribute it and/or
8
8
 * modify it under the terms of the GNU Lesser General Public
20
20
 *
21
21
 * @category   PHPExcel
22
22
 * @package    PHPExcel_Shared_Best_Fit
23
 
 * @copyright  Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)
 
23
 * @copyright  Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
24
24
 * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
25
 
 * @version    ##VERSION##, ##DATE##
 
25
 * @version    1.7.4, 2010-08-26
26
26
 */
27
27
 
28
28
 
29
 
include_once('PHPExcel/Shared/trend/bestFitClass.php');
30
 
include_once('PHPExcel/Shared/JAMA/Matrix.php');
 
29
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/bestFitClass.php';
 
30
require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/JAMA/Matrix.php';
31
31
 
32
32
 
33
33
/**
35
35
 *
36
36
 * @category   PHPExcel
37
37
 * @package    PHPExcel_Shared_Best_Fit
38
 
 * @copyright  Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)
 
38
 * @copyright  Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)
39
39
 */
40
40
class PHPExcel_Polynomial_Best_Fit extends PHPExcel_Best_Fit
41
41
{
123
123
                                $A[$i][$j] = pow($xValues[$i], $j);
124
124
                        }
125
125
                }
126
 
                for ($i=0; $i < $this->_valueCount; $i++) {
 
126
                for ($i=0; $i < $this->_valueCount; ++$i) {
127
127
                        $B[$i] = array($yValues[$i]);
128
128
                }
129
129
                $matrixA = new Matrix($A);