Exemple #1
0
 /**
  * Returns a random float
  * 
  * @return float The random variate.
  */
 public function rvs()
 {
     return $this->calculator->getRvs($this->k);
 }
Exemple #2
0
 /**
  * Returns a random float between $d1 and $d1 plus $d2
  * 
  * @param float $d1 Degrees of freedom 1. Default 1.0
  * @param float $d2 Degrees of freedom 2. Default 1.0
  * @return float The random variate.
  */
 public function getRvs($d1 = 1, $d2 = 1)
 {
     $x = $this->chi->getRvs($d1);
     $y = $this->chi->getRvs($d2);
     return $x / $d1 / ($y / $d2);
 }