1function [p, cparent, cmember] = nesdis (A, mode, opts) %#ok 2%NESDIS nested dissection ordering via CHOLMOD's nested dissection. 3% 4% Example: 5% p = nesdis(A) returns p such chol(A(p,p)) is typically sparser than 6% chol(A). Uses tril(A) and assumes A is symmetric. 7% p = nesdis(A,'sym') the same as p=nesdis(A). 8% p = nesdis(A,'col') returns p so that chol(A(:,p)'*A(:,p)) is typically 9% sparser than chol(A'*A). 10% p = nesdis(A,'row') returns p so that chol(A(p,:)*A(p,:)') is typically 11% sparser than chol(A'*A). 12% 13% A must be square for p=nesdis(A) or nesdis(A,'sym'). 14% 15% With three output arguments, [p cp cmember] = nesdis(...), the separator 16% tree and node-to-component mapping is returned. cmember(i)=c means that 17% node i is in component c, where c is in the range of 1 to the number of 18% components. length(cp) is the number of components found. cp is the 19% separator tree; cp(c) is the parent of component c, or 0 if c is a root. 20% There can be anywhere from 1 to n components, where n is dimension of A, 21% A*A', or A'*A. cmember is a vector of length n. 22% 23% An optional 3rd input argument, nesdis (A,mode,opts), modifies the default 24% parameters. opts(1) specifies the smallest subgraph that should not be 25% partitioned (default is 200). opts(2) is 0 by default; if nonzero, 26% connected components (formed after the node separator is removed) are 27% partitioned independently. The default value tends to lead to a more 28% balanced separator tree, cp. opts(3) defines when a separator is kept; it 29% is kept if the separator size is < opts(3) times the number of nodes in the 30% graph being cut (valid range is 0 to 1, default is 1). 31% 32% opts(4) specifies graph is to be ordered after it is dissected. For the 33% 'sym' case: 0: natural ordering, 1: CAMD, 2: CSYMAMD. For other cases: 34% 0: natural ordering, nonzero: CCOLAMD. The default is 1, to use CAMD for 35% the symmetric case and CCOLAMD for the other cases. 36% 37% If opts is shorter than length 4, defaults are used for entries 38% that are not present. 39% 40% NESDIS uses METIS' node separator algorithm to recursively partition the 41% graph. This gives a set of constraints (cmember) that is then passed to 42% CCOLAMD, CSYMAMD, or CAMD, constrained minimum degree ordering algorithms. 43% NESDIS typically takes slightly more time than METIS (METIS_NodeND), but 44% tends to produce better orderings. 45% 46% Requires METIS, authored by George Karypis, Univ. of Minnesota. This 47% MATLAB interface, via CHOLMOD, is by Tim Davis. 48% 49% See also METIS, BISECT, AMD 50 51% Copyright 2006-2007, Timothy A. Davis, http://www.suitesparse.com 52 53error ('nesdis mexFunction not found') ; 54