phpOMS/Math/Matrix/Matrix.php
2015-11-29 22:03:06 +01:00

19 lines
299 B
PHP

abstract class Matrix {
private $matrix = null;
public function __construct() {
}
public function setColumn($i, $vector) {
$this->matrix[$i] = $vector;
}
public function setRow($i, $vector) {
$count = count($vector)-1;
for($c = 0; $c < $count; $c++) {
$this->matrix[$c][$i] = $vector[$c];
}
}
}