home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / SPARFUN.DI$ / DMPERM.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  856 b   |  28 lines

  1. function [p,q,r,s] = dmperm(A)
  2. %DMPERM    Dulmage-Mendelsohn decomposition of matrix A.
  3. %
  4. %    p = DMPERM(A) returns a maximum matching; if A has full 
  5. %    column rank then A(p,:) is square with nonzero diagonal.
  6. %
  7. %    [p,q,r,s] = DMPERM(A) returns permutations to put A(p,q) 
  8. %    in block upper triangular form:
  9. %    For square full-rank A, A(p,q) has nonzero diagonal
  10. %    and the i'th strong Hall component is block (bi,bi) 
  11. %    of A(p,q), where bi = r(i):r(i+1)-1.
  12. %    For general rectangular A, the i'th strong Hall 
  13. %    component is block (r(i):r(i+1)-1, s(i):s(i+1)-1).
  14. %
  15. %    See also SRANK.
  16.  
  17. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  18.  
  19. if nargout <= 1,
  20.     p = sparsfun('dmperm',A);
  21. elseif nargout == 2,
  22.     [p,q] = sparsfun('dmperm',A);
  23. elseif nargout == 3,
  24.     [p,q,r] = sparsfun('dmperm',A);
  25. else
  26.     [p,q,r,s] = sparsfun('dmperm',A);
  27. end;
  28.