Exemple #1
0
 public function Opposite()
 {
     $result = new ALiVE_Matrix($this->Order());
     for ($i = 0; $i < $result->M(); ++$i) {
         for ($j = 0; $j < $result->N(); ++$j) {
             $result->Set($i, $j, -$this->Get($i, $j));
         }
     }
     return $result;
 }
Exemple #2
0
 private function FromMatrix(ALiVE_Matrix $x)
 {
     w_assert($x->M() == 1 && $x->N() == 4);
     $this->Initialize($x->Get(0, 0), $x->Get(0, 1), $x->Get(0, 2));
 }
Exemple #3
0
 public function ALiVE_Transformation(ALiVE_Matrix $matrix)
 {
     w_assert($matrix->N() == 4 && $matrix->M() == 4);
     $this->mMatrix = $matrix;
 }