SPExact_shift
PURPOSE 
[h,q,iq,nexact] = exact_shift(h,q,iq,qrows,qcols,neq)
SYNOPSIS 
function [h,q,iq,nexact] = SPExact_shift(h,q,iq,qrows,qcols,neq)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
This function is called by:
- SPAmalg [b,rts,ia,nexact,nnumeric,lgroots,aimcode] = ...
SOURCE CODE 
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 function [h,q,iq,nexact] = SPExact_shift(h,q,iq,qrows,qcols,neq)
0030
0031
0032 hs=sparse(h);
0033 nexact = 0;
0034 left = 1:qcols;
0035 right = qcols+1:qcols+neq;
0036 zerorows = find( sum(abs( hs(:,right)' ))==0 );
0037
0038 while( any(zerorows) && iq <= qrows )
0039 nz = length(zerorows);
0040 q(iq+1:iq+nz,:) = hs(zerorows,left);
0041 hs(zerorows,:) = SPShiftright(hs(zerorows,:),neq);
0042 iq = iq + nz;
0043 nexact = nexact + nz;
0044 zerorows = find( sum(abs( hs(:,right)' ))==0 );
0045 end
0046 h=full(hs);
0047
Generated on Mon 21-May-2012 02:42:43 by m2html © 2005