File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ private function LUDecomp()
4747 {
4848 $ scaling = [];
4949 $ this ->parity = 1 ; // start parity at +1 (parity is "even" for zero row interchanges)
50- $ n = $ this ->rows ;
50+ $ n = $ this ->getRowCount () ;
5151 $ p =& $ this ->permutations ;
5252
5353 // We want to find the largest element in each row for scaling.
@@ -111,7 +111,7 @@ private function LUDecomp()
111111 */
112112 public function determinant ()
113113 {
114- $ n = $ this ->rows ;
114+ $ n = $ this ->getRowCount () ;
115115 $ determinant = $ this ->parity ; // Start with +1 for an even # of row swaps, -1 for an odd #
116116
117117 // The determinant is simply the product of the diagonal elements, with sign given
@@ -147,7 +147,7 @@ private function rowPivot($thisRow, $thatRow)
147147 */
148148 public function solve (array $ b )
149149 {
150- $ n = $ this ->rows ;
150+ $ n = $ this ->getRowCount () ;
151151
152152 if (count ($ b ) !== $ n ) {
153153 throw new MatrixException ('The knowns vector must be the same size as the coefficient matrix. ' );
@@ -204,7 +204,7 @@ public function inverse()
204204 $ inverse = [];
205205
206206 // Get size of matrix
207- $ n = $ this ->rows ;
207+ $ n = $ this ->getRowCount () ;
208208 $ b = array_fill (0 , $ n , 0 ); // initialize empty vector
209209
210210 // For each j from 0 to n-1
You can’t perform that action at this time.
0 commit comments