Y; } public function getYaff() { return $this->Yaff; } public function getProjecTaux() { return $this->PROJECTAUX; } public function getProjecCoeff() { return $this->PROJECCOEF; } /** * Remplace la function PROJECCOEF * @param array $tabRegY * @param array $nbAnnees * @return boolean|number */ public function calcCOEF($tabRegY, $nbAnnees) { if ( count($this->tabRegX) == 0 || count($tabRegY) == 0 ) { return false; } $oReg = new Metier_Scores_Regression($tabRegY, $this->tabRegX); return $oReg->vCoefCorLin; } /** * Remplace la function PROJEC * @param array $tabRegY * @param array $nbAnnees * @return boolean|mixed */ public function calc($tabRegY, $nbAnnees) { if ( count($this->tabRegX) == 0 || count($tabRegY) == 0 ) { return false; } $oReg = new Metier_Scores_Regression($tabRegY, $this->tabRegX); $tab = $oReg->GetProjectionDebut($nbAnnees); $this->Y = $this->Yaff = array(); $nbRegX = count($this->tabRegX); // Début des clés pour le tableau Y des critères $j = 0 - $nbRegX; foreach($tab as $i=>$valeur) { $j++; if ( isset($this->tabRegX[$i]) ) { $this->Yaff[''.$this->tabRegX[$i].' '] = $this->Y[$j] = $tab[$i]; $lastX = $this->tabRegX[$i]; } else { $lastX++; $this->Yaff[''.$lastX.' '] = $this->Y[$j] = $tab[$i]; } } $this->PROJECTAUX = $oReg->TauxProgression($nbAnnees); $this->PROJECCOEF = $oReg->vCoefCorLin*100; return end($tab); } /** * Remplace la function PROJECTAUX * @param array $tabRegY * @param array $nbAnnees * @return boolean|number */ public function calcTAUX($tabRegY, $nbAnnees) { if ( count($this->tabRegX) == 0 || count($tabRegY) == 0 ) { return false; } $oReg = new Metier_Scores_Regression($tabRegY, $this->tabRegX); return $oReg->TauxProgression($nbAnnees); } }