Ejemplo n.º 1
0
         $s = $benchmark->displayStats($benchmark->runCholesky($i, $t));
         $m[$i] = $s['mean'];
         echo "<br />";
     }
     echo '<pre>';
     foreach ($m as $x => $y) {
         echo "{$x}\t" . 1000 * $y . "\n";
     }
     echo '</pre>';
     break;
 case 'eigenvalue':
     $m = array();
     for ($i = 2; $i <= 8; $i *= 2) {
         $t = 32 / $i;
         echo "<b>Eigenvalue decomposition: {$t} random {$i}x{$i} matrices</b><br />";
         $s = $benchmark->displayStats($benchmark->runEig($i, $t));
         $m[$i] = $s['mean'];
         echo "<br />";
     }
     echo '<pre>';
     foreach ($m as $x => $y) {
         echo "{$x}\t" . 1000 * $y . "\n";
     }
     echo '</pre>';
     break;
 case 'lu':
     $m = array();
     for ($i = 2; $i <= 8; $i *= 2) {
         $t = 32 / $i;
         echo "<b>LU decomposition: {$t} random {$i}x{$i} matrices</b><br />";
         $s = $benchmark->displayStats($benchmark->runLU($i, $t));