@@ 204-208 (lines=5) @@ | ||
201 | */ |
|
202 | public function isNonsingular() |
|
203 | { |
|
204 | for ($j = 0; $j < $this->n; ++$j) { |
|
205 | if ($this->LU[$j][$j] == 0) { |
|
206 | return false; |
|
207 | } |
|
208 | } |
|
209 | return true; |
|
210 | } // function isNonsingular() |
|
211 | ||
@@ 222-224 (lines=3) @@ | ||
219 | { |
|
220 | if ($this->m == $this->n) { |
|
221 | $d = $this->pivsign; |
|
222 | for ($j = 0; $j < $this->n; ++$j) { |
|
223 | $d *= $this->LU[$j][$j]; |
|
224 | } |
|
225 | return $d; |
|
226 | } else { |
|
227 | throw MatrixException::notSquareMatrix(); |