You are here

function PHPExcel_Best_Fit::__construct in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/bestFitClass.php \PHPExcel_Best_Fit::__construct()

* Define the regression * *

Parameters

float[] $yValues The set of Y-values for this regression: * @param float[] $xValues The set of X-values for this regression * @param boolean $const

5 calls to PHPExcel_Best_Fit::__construct()
PHPExcel_Exponential_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
PHPExcel_Linear_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/linearBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
PHPExcel_Logarithmic_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/logarithmicBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
PHPExcel_Polynomial_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
PHPExcel_Power_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/powerBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
5 methods override PHPExcel_Best_Fit::__construct()
PHPExcel_Exponential_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
PHPExcel_Linear_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/linearBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
PHPExcel_Logarithmic_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/logarithmicBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
PHPExcel_Polynomial_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *
PHPExcel_Power_Best_Fit::__construct in vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/powerBestFitClass.php
* Define the regression and calculate the goodness of fit for a set of X and Y data values * *

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/bestFitClass.php, line 412

Class

PHPExcel_Best_Fit
PHPExcel_Best_Fit

Code

function __construct($yValues, $xValues = array(), $const = True) {

  //	Calculate number of points
  $nY = count($yValues);
  $nX = count($xValues);

  //	Define X Values if necessary
  if ($nX == 0) {
    $xValues = range(1, $nY);
    $nX = $nY;
  }
  elseif ($nY != $nX) {

    //	Ensure both arrays of points are the same size
    $this->_error = True;
    return False;
  }
  $this->_valueCount = $nY;
  $this->_xValues = $xValues;
  $this->_yValues = $yValues;
}