Exemplo n.º 1
0
 /**
  * Initialize a matrix to the wisjed dimension filled with the specified value
  */
 public static function initialize(Dimension $dimension, float $value) : self
 {
     $rows = [];
     for ($i = 0; $i < $dimension->rows(); ++$i) {
         $rows[] = new RowVector(...array_fill(0, $dimension->columns(), $value));
     }
     return new self(...$rows);
 }