build/modelscript.umd.js
function(k, j, P, A, L) {
            	var maxIndex = 0;
            	var maxValue = 0;

            	for(var i = k; i <= A.rows(); i++) {
            	    if(Math.abs(A.e(i, j)) > maxValue) {
            		maxValue = Math.abs(A.e(k, j));
            		maxIndex = i;
            	    }
            	}

            	if(maxIndex != k) {
            	    var tmp = A.elements[k - 1];
            	    A.elements[k - 1] = A.elements[maxIndex - 1];
            	    A.elements[maxIndex - 1] = tmp;
            	    
            	    P.elements[k - 1][k - 1] = 0;
            	    P.elements[k - 1][maxIndex - 1] = 1;
            	    P.elements[maxIndex - 1][maxIndex - 1] = 0;
            	    P.elements[maxIndex - 1][k - 1] = 1;
            	}
            	
            	return P;
                }
function(k, j, P, A, L) {
            	var maxIndex = 0;
            	var maxValue = 0;

            	for(var i = k; i <= A.rows(); i++) {
            	    if(Math.abs(A.e(i, j)) > maxValue) {
            		maxValue = Math.abs(A.e(k, j));
            		maxIndex = i;
            	    }
            	}

            	if(maxIndex != k) {
            	    var tmp = A.elements[k - 1];
            	    A.elements[k - 1] = A.elements[maxIndex - 1];
            	    A.elements[maxIndex - 1] = tmp;
            	    
            	    P.elements[k - 1][k - 1] = 0;
            	    P.elements[k - 1][maxIndex - 1] = 1;
            	    P.elements[maxIndex - 1][maxIndex - 1] = 0;
            	    P.elements[maxIndex - 1][k - 1] = 1;
            	}
            	
            	return P;
                }
function ( k , j , P , A , L ) { var maxIndex = 0 ; var maxValue = 0 ; for ( var i = k ; i <= A . rows ( ) ; i ++ ) { if ( Math . abs ( A . e ( i , j ) ) > maxValue ) { maxValue = Math . abs ( A . e ( k , j ) ) ; maxIndex = i ; } } if ( maxIndex != k ) { var tmp = A . elements [ k - 1 ] ; A . elements [ k - 1 ] = A . elements [ maxIndex - 1 ] ; A . elements [ maxIndex - 1 ] = tmp ; P . elements [ k - 1 ] [ k - 1 ] = 0 ; P . elements [ k - 1 ] [ maxIndex - 1 ] = 1 ; P . elements [ maxIndex - 1 ] [ maxIndex - 1 ] = 0 ; P . elements [ maxIndex - 1 ] [ k - 1 ] = 1 ; } return P ; }
perorm a partial pivot on the matrix. essentially move the largest row below-or-including the pivot and replace the pivot's row with it. a pivot matrix is returned so multiplication can perform the transform.
perorm a partial pivot on the matrix . essentially move the largest row below - or - including the pivot and replace the pivot s row with it . a pivot matrix is returned so multiplication can perform the transform .