question: private void buildPTR ( ) { double [ ] temp_row ; double [ ] [ ] PTRA ; int k ; PivotTransform pt ; PTR = Matrix . identity ( n , n ) ; PTRA = PTR . getArray ( ) ; k = pivotTransformQueue . size ( ) ; while ( k -- > 0 ) { pt = pivotTransformQueue . removeLast ( ) ; temp_row = PTRA [ pt . pos1 ] ; PTRA [ pt . pos1 ] = PTRA [ pt . pos2 ] ; PTRA [ pt . pos2 ] = temp_row ; } }
target:  Build the Pivot-Transform-Reverse matrix PTR. We start with a n x n identity matrix and for each recorded pivot transformation swap the according rows, reversing the sequence and starting with the last pivot transformation.